gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet-nim] 01/02: workaround for missing notification abo


From: gnunet
Subject: [GNUnet-SVN] [gnunet-nim] 01/02: workaround for missing notification about disconnected cadet channels
Date: Sat, 18 Aug 2018 01:46:58 +0200

This is an automated email from the git hooks/post-receive script.

lurchi pushed a commit to branch master
in repository gnunet-nim.

commit f7e6bc754a832b7f2838bb49981e950417209061
Author: lurchi <address@hidden>
AuthorDate: Sat Aug 18 01:46:20 2018 +0200

    workaround for missing notification about disconnected cadet channels
---
 asynccadet.nim | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/asynccadet.nim b/asynccadet.nim
index 92b421a..bb57571 100644
--- a/asynccadet.nim
+++ b/asynccadet.nim
@@ -22,9 +22,11 @@ type
 proc channelDisconnectCb(cls: pointer,
                          gnunetChannel: ptr GNUNET_CADET_Channel) {.cdecl.} =
   let channel = cast[ptr CadetChannel](cls)
-  GNUNET_CADET_receive_done(channel.handle)
   channel.handle = nil
   channel.messages.complete()
+  # workaround: if poll in main is called with a timeout > 0, the stream 
reader is
+  # not notified about the end of the stream (Nim bug?). So call poll here, 
too.
+  poll(0)
 
 proc channelConnectCb(cls: pointer,
                       gnunetChannel: ptr GNUNET_CADET_Channel,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]