setup timeout for socket