Made TcpSessionBase::setTimeout() thread safe.