Skip to content

Commit 30b67dd

Browse files
committed
fix: set cache
1 parent 3e83ae6 commit 30b67dd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/socketio/packet.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,12 @@ def configure(cls, *args, **kwargs):
211211
logger.debug("Using cached Packet subclass for args %s, %s",
212212
args, kwargs)
213213
return cls._subclass_registry[args_hash]
214-
return cls._configure(*args, **kwargs)
214+
new = cls._configure(*args, **kwargs)
215+
if args_hash is not None:
216+
cls._subclass_registry[args_hash] = new
217+
logger.debug("Caching Packet subclass for args %s, %s",
218+
args, kwargs)
219+
return new
215220

216221
@classmethod
217222
def _configure(cls, *args, **kwargs):

0 commit comments

Comments
 (0)