Oxan van Leeuwen %!s(int64=5) %!d(string=hai) anos
pai
achega
1f645d13d6
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      stream_server.cpp

+ 2 - 1
stream_server.cpp

@@ -37,7 +37,8 @@ void StreamServerComponent::cleanup() {
 }
 
 void StreamServerComponent::read() {
-    while ((int len = this->stream_->available()) > 0) {
+    int len;
+    while ((len = this->stream_->available()) > 0) {
         char buf[128];
         size_t read = this->stream_->readBytes(buf, min(len, 128));
         for (auto const& client : this->clients_)