Move some code about so that we don't leave connections hanging if they hit the connection timeout
Move some code about so that we don't leave connections hanging if they hit the connection timeout

sarumjanuch/prosody,sarumjanuch/prosody