aboutsummaryrefslogtreecommitdiff
path: root/src/stream
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-11-19 15:18:59 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-11-19 15:18:59 +0000
commite3e9e10ff8fa9e926135a8d4ed20ed356cb86ea7 (patch)
tree754ba2f5a065d282d110540e47b33c8122b98870 /src/stream
parente70d7f62e59d59846cfb744a4c15cd772ec357be (diff)
downloadgnunet-e3e9e10ff8fa9e926135a8d4ed20ed356cb86ea7.tar.gz
gnunet-e3e9e10ff8fa9e926135a8d4ed20ed356cb86ea7.zip
- shutdown other socket also
Diffstat (limited to 'src/stream')
-rw-r--r--src/stream/test_stream_local.c9
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
208shutdown_completion (void *cls, 208shutdown_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}