pusher / pusher-websocket-dotnet

Pusher Channels Client Library for .NET
MIT License
112 stars 113 forks source link

Reset backoff to 0 on success (was never reset), and reset connection… #90

Closed rh78 closed 3 years ago

rh78 commented 4 years ago

… and disconnection tasks upon error to make reconnect logic work

rh78 commented 4 years ago

This PR fixes several issues: 1) the backoff timeout was only growing, was never reset 2) When a disconnect occured, only once a reconnect was tried, and then no reconnect attempt happened anymore, because the connection task was not set to NULL 3) The HTTP authorizer makes not much sense without any authorization means to the application server - it now supports a bearer token

rh78 commented 4 years ago

(suggestion: it would maybe make sense to fix the HTTP authorizer in a more flexible way - e.g. like in the Java client, were the implementor could just set any headers on the request as required)

damdo commented 4 years ago

Hey Reinhard @rh78 thank you for your contribution, this is great! We are taking a slightly different approach with the reconnection fix (here: https://github.com/pusher/pusher-websocket-dotnet/pull/95) but your suggestion has been really valuable. The backoff fix is 👌 and it would be nice to get it merged soon! As for the bear HTTP Auth authorization means we could discuss it on a dedicated PR.

So what we could do is, keep this PR for the backoff fix, and open a new one for the HTTP authorization. How do you feel about it?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you'd like this issue to stay open please leave a comment indicating how this issue is affecting you. Thank you.

rh78 commented 3 years ago

Could you please check if this issue is still an issue? Maybe we can close it.

elverkilde commented 3 years ago

This was incorporated in #112 and released as version 2.1.0