private void negotiateFeatures(final Element features) throws IOException
        {
            if (!attemptedEncryptionNegotiation) {
                attemptedEncryptionNegotiation = true;
                if (negotiateEncryption(features)) {
                    return;
                }
            }
            negotiateAuthentication(features);
        }
To speed up the test execution, SO_TIMEOUT (the socket read timeout) has been set to a low value. When negotiating Server Dialback, a second
socket connection is used. XMPP session establishment on the first socket connection is paused while the Server Dialback negotiation takes
place. This can easily cause the SO_TIMEOUT to run out. To prevent issues, this implementation allows for reads of the first socket connection
to time out for a certain number of times, before treating this as a terminal exception.
xmppserver/src/test/java/org/jivesoftware/openfire/session/RemoteInitiatingServerDummy.java