Skip to content

Commit

Permalink
Merge pull request #228 from mur2zab/disconnect_reconnection
Browse files Browse the repository at this point in the history
Updated the reconnectLimit to avoid reconnection on calling disconnect function
  • Loading branch information
davedbase authored Oct 13, 2022
2 parents fe696ea + 1f266d2 commit e73fe21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chatty-cycles-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solid-primitives/websocket": patch
---

Updated the reconnectLimit to avoid reconnection on calling disconnect function
2 changes: 1 addition & 1 deletion packages/websocket/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const createWebsocket = (
};
const disconnect = () => {
cancelReconnect();
reconnectLimit = Number.POSITIVE_INFINITY;
reconnectLimit = Number.NEGATIVE_INFINITY;
if (socket) {
socket.close();
}
Expand Down

0 comments on commit e73fe21

Please sign in to comment.