From: Sree Harsha Totakura Date: Mon, 19 Nov 2012 15:18:59 +0000 (+0000) Subject: - shutdown other socket also X-Git-Tag: initial-import-from-subversion-38251~10766 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e3e9e10ff8fa9e926135a8d4ed20ed356cb86ea7;p=oweals%2Fgnunet.git - shutdown other socket also --- diff --git a/src/stream/test_stream_local.c b/src/stream/test_stream_local.c index cb59de999..be299cd06 100644 --- a/src/stream/test_stream_local.c +++ b/src/stream/test_stream_local.c @@ -208,6 +208,15 @@ static void shutdown_completion (void *cls, int operation) { + static int shutdowns; + + if (++shutdowns == 1) + { + peer1.shutdown_handle = NULL; + peer2.shutdown_handle = GNUNET_STREAM_shutdown (peer2.socket, SHUT_RDWR, + &shutdown_completion, cls); + return; + } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "STREAM shutdown successful\n"); GNUNET_SCHEDULER_add_now (&do_close, cls); }