mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-18 13:09:08 +02:00
Don't send empty getdata msg when no data needed (#921)
This commit is contained in:
parent
09a0838f0a
commit
62217415f9
1 changed files with 3 additions and 2 deletions
|
|
@ -116,8 +116,9 @@ class PeerMessageHandler:
|
|||
def handle_inv(self, msg):
|
||||
invs = msg.inv
|
||||
unknown_invs = self.squeak_controller.filter_known_invs(invs)
|
||||
getdata_msg = msg_getdata(inv=unknown_invs)
|
||||
self.peer.send_msg(getdata_msg)
|
||||
if unknown_invs:
|
||||
getdata_msg = msg_getdata(inv=unknown_invs)
|
||||
self.peer.send_msg(getdata_msg)
|
||||
|
||||
def handle_getdata(self, msg):
|
||||
invs = msg.inv
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue