5s is plenty to wait for other side to respond to closedown - 15 sec was too much

topo
Simon 3 years ago
parent ffdcd019e4
commit 4423296f75

@ -71,7 +71,7 @@ class Proxy(DatagramProtocol):
if self.clientinfo and _peer_id != b'\xff\xff\xff\xff':
print(f"{datetime.now().replace(microsecond=0)} Client: ID:{str(int_id(_peer_id)).rjust(9)} IP:{self.peerTrack[_peer_id]['shost'].rjust(15)} Port:{self.peerTrack[_peer_id]['sport']} Removed.")
self.transport.write(b'RPTCL'+_peer_id, (self.master,self.peerTrack[_peer_id]['dport']))
#Tell client we have closed do the session - 3 times, in case they are on a lossy network
#Tell client we have closed the session - 3 times, in case they are on a lossy network
self.transport.write(b'MSTCL',(self.peerTrack[_peer_id]['shost'],self.peerTrack[_peer_id]['sport']))
self.transport.write(b'MSTCL',(self.peerTrack[_peer_id]['shost'],self.peerTrack[_peer_id]['sport']))
self.transport.write(b'MSTCL',(self.peerTrack[_peer_id]['shost'],self.peerTrack[_peer_id]['sport']))
@ -154,7 +154,7 @@ class Proxy(DatagramProtocol):
# Remove the client after send a MSTN or MSTC packet
if _command in (MSTN,MSTC):
# Give time to the client for a reply to prevent port reassignment
self.peerTrack[_peer_id]['timer'].reset(15)
self.peerTrack[_peer_id]['timer'].reset(5)
return

Loading…
Cancel
Save

Powered by TurnKey Linux.