Skip to content

Commit 153215b

Browse files
committed
fix: ws cancel onclose check
1 parent 12c3a1d commit 153215b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/bee.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,9 @@ export class Bee {
13751375
}
13761376
}
13771377
ws.onclose = () => {
1378-
handler.onClose(subscription)
1378+
if (!cancelled) {
1379+
handler.onClose(subscription)
1380+
}
13791381
}
13801382

13811383
return subscription

0 commit comments

Comments
 (0)