gusavila92 / java-android-websocket-client

Java/Android WebSocket Client
Apache License 2.0
148 stars 38 forks source link

onCloseReceived() doesnt fire #7

Closed kazimad closed 6 years ago

kazimad commented 6 years ago

onCloseReceived() doesnt fire

my webcocket settings

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

maybe my problem on Timeoutsettings ?

gusavila92 commented 6 years ago

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.