add timeout and shutdown for tcpconnection