SMACK is an utterly synchronous library, and there are several situations in the stream handshake where we send a packet, wait for a reply and then analyze a boolean variable manipulated by PacketReader.
In the XEP-0198 code, there was a new primitive added for that: sendStanzaAndWaitForNotifyOnLock.
However, this primitive does not allow to distingusih if the timeout was reached without a reply, or if the reply was negative. For stream resumption, encryption and compression, we may not just go on after the timeout, because eventually the server will send the reply and garble our stream. Instead, we need to bail out, terminate the connection and let the handshake start anew.
Therefore, I propose to change sendStanzaAndWaitForNotifyOnLock to throw an exception on timeout, forcing the calling code to re-start the connection (possibly using the next available round-robin server).