Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit 592daff

Browse files
committed
fix: Only close the connection if flipper is not there.
1 parent 67483c3 commit 592daff

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/connection-manager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ export default class ConnectionManager {
2727

2828
this.webSocket.onopen = callback
2929
} else if (event === "close") {
30-
this.webSocket.onclose = callback
30+
this.webSocket.onclose = () => {
31+
if (!this.flipperConnection) {
32+
callback()
33+
}
34+
}
3135
} else if (event === "message") {
3236
this.webSocket.onmessage = evt => callback(evt.data)
3337
}

0 commit comments

Comments
 (0)