mandrewcito / signalrcore

SignalR Core python client
https://mandrewcito.github.io/signalrcore/
MIT License
119 stars 57 forks source link

How to detect automatic re-connection? #48

Closed PawelTroka closed 2 years ago

PawelTroka commented 4 years ago

we have on_disconnect and on_connect but these are not called when re-connection is automatic

mandrewcito commented 4 years ago

Wich python version are yo using? On the reconnect tests thees callbacks(on_open, on_close) are tested https://github.com/mandrewcito/signalrcore/blob/master/test/reconnection_test.py#L61 is not working for you ?

PawelTroka commented 4 years ago

Python 3.9

yeah, when re-connection fails then on_close is called, but when it does not fail then there is nothing like on_reconnect, right?

morpheus65535 commented 3 years ago

I agree, having a on_reconnect and maybe a on_connection_lost event would be quite nice!

morpheus65535 commented 3 years ago

I've create a pull request that implement this new on_reconnect event: https://github.com/mandrewcito/signalrcore/pull/60