Fix a bug in PacketListener wherein all instances shared the same listener list.
This commit is contained in:
1 parent
79ee31c44e
commit
6797a59a70
1 file changed
+1
-2
@@ -35,10 +35,9 @@ class PacketBuffer(object):
|
||||
|
||||
|
||||
class PacketListener(object):
|
||||
packets_to_listen = []
|
||||
|
||||
def __init__(self, callback, *args):
|
||||
self.callback = callback
|
||||
self.packets_to_listen = []
|
||||
for arg in args:
|
||||
if issubclass(arg, Packet):
|
||||
self.packets_to_listen.append(arg)
|
||||
|
||||
Reference in new issue
Block a user