gusavila92/java-android-websocket-client

onCloseReceived() doesnt fire

Closed this issue · 1 comments

onCloseReceived() doesnt fire

my webcocket settings

webSocketClient?.setConnectTimeout(10000)
webSocketClient?.setReadTimeout(60000)
webSocketClient?.connect()

maybe my problem on Timeoutsettings ?

It happens sometimes when the server doesn't send the Close frame, because not all of them implement the WebSocket protocol strictly, they have some missing features, and the Close frame is one of the most common. I think that the server is closing the TCP connection without sending a close frame first.