mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
wpiutil: Use scoped connections to ensure cleanup (#1474)
This commit is contained in:
@@ -139,7 +139,10 @@ class HttpServerConnection {
|
||||
uv::Stream& m_stream;
|
||||
|
||||
/** The header reader connection. */
|
||||
sig::Connection m_headerConn;
|
||||
sig::ScopedConnection m_dataConn;
|
||||
|
||||
/** The end stream connection. */
|
||||
sig::ScopedConnection m_endConn;
|
||||
|
||||
/** The message complete connection. */
|
||||
sig::Connection m_messageCompleteConn;
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user