server ensure channel onClose() has run

This commit is contained in:
Michael Davidsaver
2020-08-06 16:17:25 -07:00
parent a2f478cc24
commit 4e2f9554a8
2 changed files with 15 additions and 7 deletions
+4 -2
View File
@@ -287,8 +287,10 @@ void ServerConn::cleanup()
}
for(auto& pair : chanBySID) {
pair.second->state = ServerChan::Destroy;
if(pair.second->onClose)
pair.second->onClose("");
if(pair.second->onClose) {
auto fn(std::move(pair.second->onClose));
fn("");
}
}
}