[IOMultiplexer] do not request events from closed descriptors
[ChatPrototype.git] / src / IOHandler.c
index e4fa1dd6dd30e16c9df9e57c64926e9f7826e3e8..f9e74d0cbf991e2935581c8ccbc84e1f302dbc33 100644 (file)
@@ -553,6 +553,7 @@ void iohandler_events(struct IODescriptor *iofd, int readable, int writeable) {
             if(!readable && !writeable) {
                 callback_event.type = IOEVENT_SSLFAILED;
                 iofd->state = IO_CLOSED;
+                engine->update(iofd);
             } else {
                 iohandler_log(IOLOG_DEBUG, "triggering iohandler_ssl_client_handshake for %s (fd: %d)", iohandler_iotype_name(iofd->type), iofd->fd);
                 iohandler_ssl_client_handshake(iofd);