Fixed missing socket import.

Fixed socket exception handler breaking when socket operation timed out.