Fixed: Close the socket immediately when connection timed out