setting socket timeout to 1 second