Socket timeout handling