I am using ws.connect to connect to a socket and the data starts coming without a problem but I cant stop the connection. Ws.close doesn't stop the connection ana ws_disconnected is not fired. What may be the reason for this ?
edit : the problem was ws was declared twice , but _disconnected event is stil not firing altough _connected event is firing on connection.