The ping thread that is forked when the connection is accepted can cause interleaved writes. This is likely to occur when the server is sending a large amount of data down, as the ping thread fires every 30 seconds. The symptom of the interleaved writes is the browser closing the connection with a ``Could not decode a text frame as UTF-8'' message.
As every write causes snap to reset the connection timeout we want to ensure that our own pings are not preventing an eventual timeout if clients do not send back pong messages. To achieve this we lower the timeout while waiting for a pong.
…nection flag in RequestHttpPart now.