Browse Source

The MultiplexedCircuitConnection received() callback should get the peer's address instead of the peer object itself

Ian Goldberg 4 years ago
parent
commit
e18f2419da
1 changed files with 3 additions and 3 deletions
  1. 3 3
      relay.py

+ 3 - 3
relay.py

@@ -44,12 +44,12 @@ class MultiplexedCircuitConnection(network.Connection):
     def send_cell(self, circid, msg):
         """Send the given message, tagged for the given circuit id."""
         cell = CircuitCellMsg(circid, msg)
-        self.peer.received(self, cell)
+        self.peer.received(self.cellrelay.myaddr, cell)
 
-    def received(self, peer, cell):
+    def received(self, peeraddr, cell):
         """Callback when a cell is received from the network."""
         circid, msg = cell.circid, cell.msg
-        print("received", msg, "on circuit", circid, "from", peer)
+        print("received", msg, "on circuit", circid, "from", peeraddr)
 
 
 class CellRelay: