aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-09-08 20:58:44 +0200
committerMaxime Devos <maximedevos@telenet.be>2021-09-21 12:21:00 +0200
commit1a0ff0a7d1a8aa0f16e9f3b75b38b73e6b037ff5 (patch)
tree24a603d74123d5bd7692e1d5cd47b9b9791a687d /gnu
parent5cfadf81bf2ac7d407e67fa9a2a2caaa7135095d (diff)
downloadgnunet-scheme-1a0ff0a7d1a8aa0f16e9f3b75b38b73e6b037ff5.tar.gz
gnunet-scheme-1a0ff0a7d1a8aa0f16e9f3b75b38b73e6b037ff5.zip
doc: Document that (gnu gnunet nse client) reconnects.
* doc/scheme-gnunet.tm (Estimation of the size of the network): Document that the module will retry after a disconnect.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/gnunet/nse/client.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/gnunet/nse/client.scm b/gnu/gnunet/nse/client.scm
index a9072ef..f19f06c 100644
--- a/gnu/gnunet/nse/client.scm
+++ b/gnu/gnunet/nse/client.scm
@@ -116,7 +116,7 @@ timestamp."
116 116
117 ;; See 'connect'. 117 ;; See 'connect'.
118 (define* (reconnect estimate/box config #:key updated connected disconnected 118 (define* (reconnect estimate/box config #:key updated connected disconnected
119 (spawn spawn-fiber)) 119 (spawn spawn-fiber) #:rest rest)
120 (define (handle-estimate! estimate-slice) 120 (define (handle-estimate! estimate-slice)
121 (define estimate 121 (define estimate
122 (%make-estimate 122 (%make-estimate
@@ -157,8 +157,12 @@ timestamp."
157 ;; TODO this means the server has closed the connection ... 157 ;; TODO this means the server has closed the connection ...
158 ;; ---> reconnect? 158 ;; ---> reconnect?
159 ((input:regular-end-of-file input:premature-end-of-file) 159 ((input:regular-end-of-file input:premature-end-of-file)
160 ;; Call 'reconnect' after 'disconnected'. Otherwise,
161 ;; it is possible that 'connected' is called twice without
162 ;; a call to 'disconnected' in-between, which would presumably
163 ;; be confusing.
160 (when disconnected (disconnected)) 164 (when disconnected (disconnected))
161 (values)))) 165 (apply reconnect estimate/box config rest))))
162 (define mq (connect/fibers config "nse" handlers error-handler 166 (define mq (connect/fibers config "nse" handlers error-handler
163 #:spawn spawn)) 167 #:spawn spawn))
164 (signal-condition! mq-defined)) 168 (signal-condition! mq-defined))