From 00235a0288d5df3acc139e5cefe1c964ac6d5a4c Mon Sep 17 00:00:00 2001
From: caryoscelus <caryoscelus@gmx.com>
Date: Fri, 7 Jan 2022 11:23:59 +0000
Subject: [PATCH 1/3] better error message & minor comment

---
 src/Peer/Peer.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Peer/Peer.py b/src/Peer/Peer.py
index 03cc1f47..bbbf9501 100644
--- a/src/Peer/Peer.py
+++ b/src/Peer/Peer.py
@@ -157,10 +157,11 @@ class Peer(object):
         for retry in range(1, 4):  # Retry 3 times
             try:
                 if not self.connection:
+                    # this is redundant, already established that self.connection is present
                     raise Exception("No connection found")
                 res = self.connection.request(cmd, params, stream_to)
                 if not res:
-                    raise Exception("Send error")
+                    raise Exception("Send error : result is empty")
                 if "error" in res:
                     self.log("%s error: %s" % (cmd, res["error"]))
                     self.onConnectionError("Response error")

From 897dae2790184279d895093887a1376c9ea2603c Mon Sep 17 00:00:00 2001
From: caryoscelus <caryoscelus@gmx.com>
Date: Fri, 7 Jan 2022 11:32:22 +0000
Subject: [PATCH 2/3] fix onion-v3 trackers

fixes #4
---
 plugins/AnnounceZero/AnnounceZeroPlugin.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/AnnounceZero/AnnounceZeroPlugin.py b/plugins/AnnounceZero/AnnounceZeroPlugin.py
index 623cd4b5..d57190b2 100644
--- a/plugins/AnnounceZero/AnnounceZeroPlugin.py
+++ b/plugins/AnnounceZero/AnnounceZeroPlugin.py
@@ -124,7 +124,7 @@ class SiteAnnouncerPlugin(object):
                     sign = CryptRsa.sign(res["onion_sign_this"].encode("utf8"), self.site.connection_server.tor_manager.getPrivatekey(onion))
                     request["onion_signs"][publickey] = sign
             res = tracker_peer.request("announce", request)
-            if not res or "onion_sign_this" in res:
+            if not res:
                 if full_announce:
                     time_full_announced[tracker_address] = 0
                 raise AnnounceError("Announce onion address to failed: %s" % res)

From 53d1437a654502097e81469ee8db3e674cf2af53 Mon Sep 17 00:00:00 2001
From: caryoscelus <caryoscelus@gmx.com>
Date: Fri, 7 Jan 2022 12:45:05 +0000
Subject: [PATCH 3/3] fix orthography in error message

---
 src/Peer/Peer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Peer/Peer.py b/src/Peer/Peer.py
index bbbf9501..e525b421 100644
--- a/src/Peer/Peer.py
+++ b/src/Peer/Peer.py
@@ -161,7 +161,7 @@ class Peer(object):
                     raise Exception("No connection found")
                 res = self.connection.request(cmd, params, stream_to)
                 if not res:
-                    raise Exception("Send error : result is empty")
+                    raise Exception("Send error: result is empty")
                 if "error" in res:
                     self.log("%s error: %s" % (cmd, res["error"]))
                     self.onConnectionError("Response error")