braverhealth / phoenix-socket-dart

Cross-platform and stream-based implementation of Phoenix Sockets
https://pub.dev/packages/phoenix_socket
BSD 3-Clause "New" or "Revised" License
73 stars 37 forks source link

fix: Issue #34 If my phoenix server is stopped, the client keeps on r… #50

Closed ndelanou closed 1 year ago

ndelanou commented 1 year ago

Fix issue #34

The reconnection delay is now computed based on the _reconnectAttempts counter.

The method _delayedReconnect() does not require a delay parameter anymore, since the same logic is applied in connect() and _onSocketClosed()

vizakenjack commented 1 year ago

Thanks! I thought about this problem today and here is the solution.

ndelanou commented 1 year ago

Added test

matehat commented 1 year ago

Great!! Thanks a lot @ndelanou !