Ok so, when the websocket connection ends i need to execute some code in onclose event in server-side and client-side in that instant, but when cloudflare ends the connections at restart their servers, the onclose event isn't executed correctly, it takes like 10 seconds in execute and sometimes it never execute.
I removed all timeouts from my nginx restart and I still with this issue, please help me!!!
#Delay at .onclose event with my websocket
8 messages · Page 1 of 1 (latest)
It sounds like you're not actually closing the frames, you're just timing them out?
If that's the case, then the state of the connection is determined by whether a PING is replied with PONG or not, and those PINGs are not done constantly, usually the interval is 20 seconds or such.
the connection ends in client side without any problem but when i put a System.out.print() for check onclose event in servre side it didnt logged nothing, so i have no idea whats wrong, it only happends when cloudflare ends connection at restart their servers as i said.
But that is not a graceful exit, that's a timeout.
Do you mean like a rate limit?