Description
The protocolDetectionTimeout value is supposed to define how long a connection attempt has to detect the protocol type before failing. However there is a small issue where the initial SSL handshake is being done outside of the async task that times out. This means that if the SSL handshake isn't finished because the client never sends enough bytes (such as if a client opens a normal TCP socket) then the socket will just hang open and not be closed. The handshake should be moved inside of the task that times out to fix this.
Also, I'm going to change the default protocolDetectionTimeout to 30 seconds instead of 15 seconds as 30 is the default for the TcpTransport connectionTimeout value and also the default for the InactivityMonitor.