diff --git a/components/rgbd-sources/src/net.cpp b/components/rgbd-sources/src/net.cpp index ee89beca2e3e1827c40602ec99f61b5c30032dff..2e89c8617125d9fd7cf0bbf21e25ed5961dd6acd 100644 --- a/components/rgbd-sources/src/net.cpp +++ b/components/rgbd-sources/src/net.cpp @@ -135,8 +135,8 @@ void NetSource::_updateURI() { } bool NetSource::grab() { - if (N_ == 1) { - N_ += 10; + if (N_ <= 1) { + N_ = 10; if (!host_->getNet()->send(peer_, "get_stream", *host_->get<string>("uri"), 10, 0, host_->getNet()->id(), *host_->get<string>("uri"))) { active_ = false; } diff --git a/components/rgbd-sources/src/streamer.cpp b/components/rgbd-sources/src/streamer.cpp index 4c1051397e2e0adbb0c184015a344071df73d5af..ef0fdaae60e4783f35b0f828bc5338d58946f9e5 100644 --- a/components/rgbd-sources/src/streamer.cpp +++ b/components/rgbd-sources/src/streamer.cpp @@ -119,7 +119,7 @@ void Streamer::_addClient(const string &source, int N, int rate, const ftl::UUID if (s->clients[rate][i].peerid == peer) { StreamClient &c = s->clients[rate][i]; c.txmax = N; - c.txcount -= N; + c.txcount = 0; return; } }