update for timeout and close connection