[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 02/04: tests/distributed-hash-table: Avoid spurious erro
From: |
gnunet |
Subject: |
[gnunet-scheme] 02/04: tests/distributed-hash-table: Avoid spurious error messages. |
Date: |
Thu, 30 Jun 2022 16:49:02 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit e03df9ac1b84fe7d5942077582f19919e92d4236
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Thu Jun 30 10:31:59 2022 +0000
tests/distributed-hash-table: Avoid spurious error messages.
Disconnecting is fine there!
* tests/distributed-hash-table.scm
(only-disconnect-handler): New procedure.
(simulate-dht-service): Use it instead of 'no-error-handler'.
---
tests/distributed-hash-table.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/distributed-hash-table.scm b/tests/distributed-hash-table.scm
index caf39bc..59534c7 100644
--- a/tests/distributed-hash-table.scm
+++ b/tests/distributed-hash-table.scm
@@ -432,6 +432,11 @@
(pk 'e e)
(error "no error handler"))
+(define (only-disconnect-handler e . rest)
+ (case e
+ ((input:regular-end-of-file) (values)) ; ok
+ (else => (apply no-error-handler e rest)))) ; not ok
+
;; TODO: would be nice to turn this in a real service
;; (gnu gnunet dht service).
(define* (simulate-dht-service #:optional (explode (make-condition)))
@@ -537,7 +542,8 @@ supported. When @var{explode} is signalled, the connection
is closed."
(symbol-value message-type msg:dht:client:get)
handle/start-get!))))
(set! mq
- (port->message-queue port h no-error-handler #:spawn spawn-fiber))
+ (port->message-queue port h only-disconnect-handler
+ #:spawn spawn-fiber))
(signal-condition! mq-defined)
(values))))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.