src/main.c
changeset 47 a689b6a8e6ed
parent 33 56571d34d754
child 49 59b09b0aeb96
--- a/src/main.c
+++ b/src/main.c
@@ -92,7 +92,8 @@
     }
 
     while (!feof (message.stream)) {
-        fgets (buf, sizeof (buf), message.stream);
+        if (fgets (buf, sizeof (buf), message.stream) == NULL)
+            break;
 
         if (!active)            /* the bot was killed with SIGTERM */
             break;