mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Source: Keep track of how many sinks are connected and enabled.
This commit is contained in:
@@ -290,6 +290,7 @@ void HTTPSinkImpl::SendStream(wpi::raw_socket_ostream& os) {
|
||||
|
||||
DEBUG("Headers send, sending stream now");
|
||||
|
||||
Enable();
|
||||
while (m_active && !os.has_error()) {
|
||||
auto source = GetSource();
|
||||
if (!source) {
|
||||
@@ -321,9 +322,9 @@ void HTTPSinkImpl::SendStream(wpi::raw_socket_ostream& os) {
|
||||
os << "\r\n--" BOUNDARY "\r\n";
|
||||
// os.flush();
|
||||
}
|
||||
Disable();
|
||||
}
|
||||
|
||||
|
||||
// thread for clients that connected to this server
|
||||
void HTTPSinkImpl::ConnThreadMain(wpi::NetworkStream* stream) {
|
||||
wpi::raw_socket_istream is{*stream};
|
||||
|
||||
Reference in New Issue
Block a user