Skip to content

Commit 47e14db

Browse files
committed
fix(websockets): close websocket cleanly on android
1 parent f59d9d4 commit 47e14db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nativescript-websockets/bridge.android.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ export class NativeBridge extends NativeBridgeDefinition {
168168
}
169169
this.ws._websocketOpen(param1.protocol().toString());
170170
}
171-
public onClosing(param0: okhttp3.WebSocket, param1: number, param2: string): void {
172-
//
171+
public onClosing(websocket: okhttp3.WebSocket, code: number, reason: string): void {
172+
websocket.close(code, reason);
173173
}
174174

175175
private isCorrectThread() {

0 commit comments

Comments
 (0)