From: Christian Grothoff Date: Sun, 25 Nov 2012 12:31:00 +0000 (+0000) Subject: -fix double-sending in stream if finish_cb behaves in a certain way X-Git-Tag: initial-import-from-subversion-38251~10711 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=aa3fe66f2aab8098491304d7083426c579c2cd4d;p=oweals%2Fgnunet.git -fix double-sending in stream if finish_cb behaves in a certain way --- diff --git a/src/stream/stream_api.c b/src/stream/stream_api.c index 5f0fbaa77..66c24dc86 100644 --- a/src/stream/stream_api.c +++ b/src/stream/stream_api.c @@ -626,6 +626,8 @@ send_message_notify (void *cls, size_t size, void *buf) head); GNUNET_free (head->message); GNUNET_free (head); + if (NULL != socket->transmit_handle) + return ret; /* 'finish_cb' might have triggered message already! */ head = socket->queue_head; if (NULL != head) /* more pending messages to send */ {