Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to close WebSocket with JavaScript

I am trying to close my websocket via:

socket.close();

However I get the error on Safari 5.0.4:

TypeError: Result of expression 'socket.close' [undefined] is not a function.

How can I properly close my web socket?

like image 601
Sheehan Alam Avatar asked Sep 18 '25 02:09

Sheehan Alam


1 Answers

socket.disconnect() worked. yay.

like image 84
Sheehan Alam Avatar answered Sep 19 '25 19:09

Sheehan Alam