Stop socket write_timeout timer when closing socket.