Fix crash during shutdown

In case there are multiple PosixStreams with the same name, the server crashed during shutdown
This commit is contained in:
badaix 2020-01-06 18:50:57 +01:00
parent e12fa3fc7d
commit 062e46060c
4 changed files with 9 additions and 7 deletions

View file

@ -68,7 +68,7 @@ void PosixStream::connect()
void PosixStream::do_disconnect()
{
if (stream_->is_open())
if (stream_ && stream_->is_open())
stream_->close();
}