Closed banacorn closed 11 years ago
The reason this ping thread is spawned for websockets-snap
is that Snap kills the connection after a set amount of seconds (I think 30) unless the connection has been "tickled" (e.g. by sending a ping). This is a built-in protection against certain types of DDoS attacks. If Warp doesn't kill the connection, I don't think a ping thread is needed by default.
Got it! Thanks!
Hi again! :)
I've noticed that there's a
forkPingThread
callback attached to the fieldpendingOnAccept
, and I ported it towai-websockets
, too, because I thought it was essential.But then I came across
websockets-0.8.0.0
and found it left out like this.Is
forkPingThread
a snap-related hack and should I remove it fromwai-websockets
?Are those fields meant to be internal stuff because I can't seem to configure them (as an end user).