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:
@@ -88,7 +88,10 @@ RemoteSyslogChannel::~RemoteSyslogChannel()
|
|||||||
void RemoteSyslogChannel::open()
|
void RemoteSyslogChannel::open()
|
||||||
{
|
{
|
||||||
if (_open) return;
|
if (_open) return;
|
||||||
|
|
||||||
|
// reset socket for the case that it has been previously closed
|
||||||
|
_socket = DatagramSocket();
|
||||||
|
|
||||||
if (_logHost.find(':') != std::string::npos)
|
if (_logHost.find(':') != std::string::npos)
|
||||||
_socketAddress = SocketAddress(_logHost);
|
_socketAddress = SocketAddress(_logHost);
|
||||||
else
|
else
|
||||||
@@ -105,6 +108,8 @@ void RemoteSyslogChannel::open()
|
|||||||
_host = _socket.address().host().toString();
|
_host = _socket.address().host().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_open = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user