IlyaSkriblovsky / txredisapi

non-blocking redis client for python twisted
Apache License 2.0
235 stars 91 forks source link

FIX charset=None was causing SubscriberProtocol.messageReceived to ne… #150

Closed EllieTheYeen closed 1 year ago

EllieTheYeen commented 1 year ago

This will fix the issue where charset if set to None would cause SubscriberProtocol .messageReceived to never be called

If the charset = None in SubscriberProtocol then SubscriberProtocol .replyReceived will never call SubscriberProtocol.messageReceived due to u"message" when received will not match b"message" and u"pmessage" will not match b"pmessage" inside the if clauses therefore the code where messageReceived is called will never be reached. This is due to types of str and bytes will not match each other even if similar values are inside

IlyaSkriblovsky commented 1 year ago

Thank you! Good catch.

Is it ready? Did you test it to be sure it works properly now with empty charset?

EllieTheYeen commented 1 year ago

I have tested what I could and it seems to work great at the moment in the applications where I use it and I have not found any problems yet

IlyaSkriblovsky commented 1 year ago

Thank you!

Could you please add yourself to CONTRIBUTORS.md ?

EllieTheYeen commented 1 year ago

Is it really important since I would rather not put my real name and email address in places?

IlyaSkriblovsky commented 1 year ago

Of course not! You can put any kind of nickname without an email if you want to or not put anything at all. It's totally up to you.