aboutsummaryrefslogtreecommitdiff
path: root/zyklonb.c
diff options
context:
space:
mode:
Diffstat (limited to 'zyklonb.c')
-rw-r--r--zyklonb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/zyklonb.c b/zyklonb.c
index fd0c80a..d3de92d 100644
--- a/zyklonb.c
+++ b/zyklonb.c
@@ -203,8 +203,8 @@ bot_context_free (struct bot_context *self)
if (self->irc_fd != -1)
{
- xclose (self->irc_fd);
poller_fd_reset (&self->irc_event);
+ xclose (self->irc_fd);
}
if (self->ssl)
SSL_free (self->ssl);
@@ -1585,13 +1585,11 @@ on_irc_disconnected (struct bot_context *ctx)
ctx->ssl_ctx = NULL;
}
+ poller_fd_reset (&ctx->irc_event);
xclose (ctx->irc_fd);
ctx->irc_fd = -1;
ctx->irc_registered = false;
- ctx->irc_event.closed = true;
- poller_fd_reset (&ctx->irc_event);
-
// TODO: inform plugins about the disconnect event
// All of our timers have lost their meaning now