From aa3fe66f2aab8098491304d7083426c579c2cd4d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 25 Nov 2012 12:31:00 +0000 Subject: [PATCH] -fix double-sending in stream if finish_cb behaves in a certain way --- src/stream/stream_api.c | 2 ++ 1 file changed, 2 insertions(+) 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 */ { -- 2.25.1