[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb] 02/02: fixup! Add a delay when retrying to connect to the rdsys backend



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

meskio pushed a commit to branch main
in repository bridgedb.

commit ecbbc6fd04697d573a2174a335618a5e530ac6ff
Author: meskio <meskio@xxxxxxxxxxxxxx>
AuthorDate: Sun May 29 22:16:28 2022 +0200

    fixup! Add a delay when retrying to connect to the rdsys backend
---
 bridgedb/rdsys.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bridgedb/rdsys.py b/bridgedb/rdsys.py
index f6ccd4e..58c0c8d 100644
--- a/bridgedb/rdsys.py
+++ b/bridgedb/rdsys.py
@@ -103,6 +103,8 @@ def start_stream(distributor, token, rdsys_address, hashring):
 
     def delayError(err):
         nonlocal delay
+        logging.warning("Error on the connection with rdsys, will wait %s seconds to retry: %s" % (delay, str(err)))
+
         d = Deferred()
         reactor.callLater(delay, d.errback, err)
         delay *= 2
@@ -134,7 +136,7 @@ def start_stream(distributor, token, rdsys_address, hashring):
         )
         d.addErrback(delayError)
         d.addCallback(cbResponse)
-        d.addErrback(lambda err: logging.warning("Error on the connection with rdsys: " + str(err)))
+        d.addErrback(lambda err: logging.warning("Retry connection to rdsys after error: " + str(err)))
         d.addCallback(connect)
 
     connect()

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits