diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-11-19 15:18:59 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-11-19 15:18:59 +0000 |
commit | e3e9e10ff8fa9e926135a8d4ed20ed356cb86ea7 (patch) | |
tree | 754ba2f5a065d282d110540e47b33c8122b98870 /src/stream | |
parent | e70d7f62e59d59846cfb744a4c15cd772ec357be (diff) | |
download | gnunet-e3e9e10ff8fa9e926135a8d4ed20ed356cb86ea7.tar.gz gnunet-e3e9e10ff8fa9e926135a8d4ed20ed356cb86ea7.zip |
- shutdown other socket also
Diffstat (limited to 'src/stream')
-rw-r--r-- | src/stream/test_stream_local.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 | |||
208 | shutdown_completion (void *cls, | 208 | shutdown_completion (void *cls, |
209 | int operation) | 209 | int operation) |
210 | { | 210 | { |
211 | static int shutdowns; | ||
212 | |||
213 | if (++shutdowns == 1) | ||
214 | { | ||
215 | peer1.shutdown_handle = NULL; | ||
216 | peer2.shutdown_handle = GNUNET_STREAM_shutdown (peer2.socket, SHUT_RDWR, | ||
217 | &shutdown_completion, cls); | ||
218 | return; | ||
219 | } | ||
211 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "STREAM shutdown successful\n"); | 220 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "STREAM shutdown successful\n"); |
212 | GNUNET_SCHEDULER_add_now (&do_close, cls); | 221 | GNUNET_SCHEDULER_add_now (&do_close, cls); |
213 | } | 222 | } |