diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-05-06 21:35:44 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-05-06 21:35:44 +0200 |
commit | c3d62b87996337130f7cdfe6787c92d882196be2 (patch) | |
tree | 515e0ca021dc3e5ef3c2b6754653245fd2f92281 /degesch.c | |
parent | ec842db0fbd3e57b49d0b9a232bd102d54596d0f (diff) | |
download | xK-c3d62b87996337130f7cdfe6787c92d882196be2.tar.gz xK-c3d62b87996337130f7cdfe6787c92d882196be2.tar.xz xK-c3d62b87996337130f7cdfe6787c92d882196be2.zip |
Avoid the "poller_fd::closed" feature
Reliability enhancement for Linux.
This feature was created for ponymap, however we don't care about an
extra syscall in most places. Doing it right even saves lines.
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1862,9 +1862,8 @@ server_destroy (struct server *self) if (self->socket != -1) { - xclose (self->socket); - self->socket_event.closed = true; poller_fd_reset (&self->socket_event); + xclose (self->socket); } str_free (&self->read_buffer); str_free (&self->write_buffer); @@ -4844,13 +4843,11 @@ irc_destroy_transport (struct server *s) s->transport->cleanup (s); s->transport = NULL; + poller_fd_reset (&s->socket_event); xclose (s->socket); s->socket = -1; s->state = IRC_DISCONNECTED; - s->socket_event.closed = true; - poller_fd_reset (&s->socket_event); - str_reset (&s->read_buffer); str_reset (&s->write_buffer); } |