From 8038af295895516fdfcfc95a2ad53eaf3b2e0409 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 28 Dec 2020 11:17:59 +0000 Subject: [PATCH] Remove proxy tracking if master sends MSTNAK --- hotspot_proxy.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hotspot_proxy.py b/hotspot_proxy.py index 6cf6f89..8b57af4 100644 --- a/hotspot_proxy.py +++ b/hotspot_proxy.py @@ -22,10 +22,9 @@ class Proxy(DatagramProtocol): if host == '127.0.0.1' and port in self.connTrack: if int(self.connTrack[port]['time'])+self.timeout >nowtime: self.transport.write(data,(self.connTrack[port]['host'],self.connTrack[port]['sport'])) - #if master refuses login, remove tracking and block fornowtimeout seconds - #if data == b'MSTNAK\x00#\xbf"': - #self.connTrack[port]['time'] = False - #self.connTrack[port]['nacktime'] =nowtime+self.timeout + #if master refuses login, remove tracking + if data == b'MSTNAK\x00#\xbf"': + self.connTrack[port]['time'] = False if Debug: print("return path match") print(data)