Implement timeout and the timeout exception on STMP connection attempts