From e3e9e10ff8fa9e926135a8d4ed20ed356cb86ea7 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Mon, 19 Nov 2012 15:18:59 +0000 Subject: [PATCH] - shutdown other socket also --- src/stream/test_stream_local.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } -- 2.25.1