Skip to content

Commit

Permalink
Always reset connection attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
elnormous committed Jun 21, 2017
1 parent 23ebfa9 commit 3b0923d
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions src/Connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,22 @@ namespace relay
{
server->stopReceiving(*this);
server->stopStreaming(*this);

if (type != Type::CLIENT)
{
videoStream = true;
audioStream = true;
dataStream = true;

streamType = StreamType::NONE;
applicationName.clear();
streamName.clear();
overrideApplicationName.clear();
overrideStreamName.clear();
metaDataBlacklist.clear();
server = nullptr;
}
server = nullptr;
}

// disconnect all host connections
if (type == Type::HOST)
{
videoStream = true;
audioStream = true;
dataStream = true;

streamType = StreamType::NONE;
applicationName.clear();
streamName.clear();
overrideApplicationName.clear();
overrideStreamName.clear();
metaDataBlacklist.clear();
}
}

Expand Down

0 comments on commit 3b0923d

Please sign in to comment.