mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-21 23:56:54 +02:00
Allow RemoteSyslogChannel to be used again after being closed.
This commit is contained in:
@@ -89,6 +89,9 @@ void RemoteSyslogChannel::open()
|
||||
{
|
||||
if (_open) return;
|
||||
|
||||
// reset socket for the case that it has been previously closed
|
||||
_socket = DatagramSocket();
|
||||
|
||||
if (_logHost.find(':') != std::string::npos)
|
||||
_socketAddress = SocketAddress(_logHost);
|
||||
else
|
||||
@@ -105,6 +108,8 @@ void RemoteSyslogChannel::open()
|
||||
_host = _socket.address().host().toString();
|
||||
}
|
||||
}
|
||||
|
||||
_open = true;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user