wpiutil: Use scoped connections to ensure cleanup (#1474)

This commit is contained in:
Peter Johnson
2018-12-09 01:36:36 -08:00
committed by GitHub
parent e0e15eafeb
commit 608d82423d
4 changed files with 15 additions and 8 deletions

View File

@@ -137,7 +137,9 @@ class WebSocketServer : public std::enable_shared_from_this<WebSocketServer> {
SmallVector<std::string, 2> m_protocols;
ServerOptions m_options;
bool m_aborted = false;
sig::Connection m_headerConn;
sig::ScopedConnection m_dataConn;
sig::ScopedConnection m_errorConn;
sig::ScopedConnection m_endConn;
void Abort(uint16_t code, StringRef reason);
};