Added timeout for tcp-connections