From f2c623fe7f7d770ec16f6a0820ed403ea5f43156 Mon Sep 17 00:00:00 2001 From: David Brodsky Date: Sun, 22 Oct 2006 15:54:51 +0200 Subject: [PATCH] Add explanation comment to Tairon::Net::Reader. --- src/net-limit/reader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/net-limit/reader.cpp b/src/net-limit/reader.cpp index b1ad99b..8157091 100644 --- a/src/net-limit/reader.cpp +++ b/src/net-limit/reader.cpp @@ -48,7 +48,7 @@ void Reader::read() if (!count) // no more bytes allowed to read limiter->wantMore(readFunctor); - // it isn't needed to delete socket from polling here, because it's + // it isn't needed to delete socket from polling here because it's // been already done else { try { @@ -59,6 +59,10 @@ void Reader::read() dataReadSignal.emit(this, len); if (offset == bufSize) bufferFullSignal.emit(this); + + // it isn't needed to do limiter->wantMore() here because when + // we read from the socket it's been added to polling so this + // method will be called anyway } } catch (const Tairon::Net::SocketException &) { // connection has been closed or something else bad happened socket->close(); -- 2.11.4.GIT