Fix a bug in PacketListener wherein all instances shared the same listener list.

This commit is contained in:
joo 2015-09-04 18:59:21 +01:00
parent 79ee31c44e
commit 6797a59a70

View File

@ -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)