Exception safety for std::mutex::lock in TCPServer