Add global timeout for socket operations.