Skip to content

Commit

Permalink
fix a few errors
Browse files Browse the repository at this point in the history
  • Loading branch information
marek22k committed Oct 22, 2023
1 parent 20604ce commit 8db97ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Connection/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def getHandshakeInfo(self):
else:
peer_id = self.server.peer_id
# Setup peer lock from requested onion address
if self.handshake
if self.handshake:
if self.handshake.get("target_ip", "").endswith(".onion") and self.server.tor_manager.start_onions:
self.target_onion = self.handshake.get("target_ip").replace(".onion", "") # My onion address
if not self.server.tor_manager.site_onions.values():
Expand Down Expand Up @@ -439,7 +439,7 @@ def setHandshake(self, handshake):
if crypt:
self.crypt = crypt

if self.type == "in"
if self.type == "in":
if handshake.get("onion") and not self.ip_type == "onion": # Set incoming connection's onion address
if self.server.ips.get(self.ip) == self:
del self.server.ips[self.ip]
Expand Down
2 changes: 1 addition & 1 deletion src/I2P/I2PManager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from gevent.coros import RLock
from gevent.lock import RLock
from gevent.server import StreamServer
from gevent.pool import Pool
from http.client import HTTPConnection
Expand Down

0 comments on commit 8db97ff

Please sign in to comment.