Added a 3-second socket timeout.