From: Christian Grothoff Date: Tue, 25 May 2010 16:04:21 +0000 (+0000) Subject: fixing handling of transmit errors X-Git-Tag: initial-import-from-subversion-38251~21569 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=64155043d4b27911a6bcf94b625b6fd8ecaa01ab;p=oweals%2Fgnunet.git fixing handling of transmit errors --- diff --git a/src/util/connection.c b/src/util/connection.c index 290a361b3..8c7a2c4f8 100644 --- a/src/util/connection.c +++ b/src/util/connection.c @@ -1352,6 +1352,14 @@ transmit_error (struct GNUNET_CONNECTION_Handle *sock) GNUNET_NETWORK_socket_close (sock->sock)); sock->sock = NULL; } + if (sock->read_task != GNUNET_SCHEDULER_NO_TASK) + { + GNUNET_SCHEDULER_cancel (sock->sched, + sock->read_task); + sock->read_task = GNUNET_SCHEDULER_NO_TASK; + signal_timeout (sock); + return; + } if (sock->nth.notify_ready == NULL) return; /* nobody to tell about it */ notify = sock->nth.notify_ready;