Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / engine_poll.c
index b5ca2c7d498a622d5381683511cf469242ee9bf4..a0159ef076ee9dc3a9c785cf16080fcbc0f54409 100644 (file)
@@ -263,7 +263,7 @@ engine_loop(struct Generators* gen)
        /* Log the poll error */
        log_write(LS_SOCKET, L_ERROR, 0, "poll() error: %m");
        if (!errors++)
-         timer_add(&clear_error, error_clear, 0, TT_PERIODIC,
+         timer_add(timer_init(&clear_error), error_clear, 0, TT_PERIODIC,
                    ERROR_EXPIRE_TIME);
        else if (errors > POLL_ERROR_THRESHOLD) /* too many errors... */
          server_restart("too many poll errors");
@@ -303,8 +303,6 @@ engine_loop(struct Generators* gen)
        }
       }
 
-      assert(!(pollfdList[i].revents & POLLERR));
-
 #ifdef POLLHUP
       if (pollfdList[i].revents & POLLHUP) { /* hang-up on socket */
        Debug((DEBUG_ENGINE, "poll: EOF from client (POLLHUP)"));