nb: write while output buffer not empty

Change-Id: I257b72365b4711fd7ffc8bbda5a21d501828575b
This commit is contained in:
Ashod Nakashian 2017-02-21 20:34:37 -05:00 committed by Jan Holesovsky
parent cff706861f
commit 393071573b

View file

@ -352,7 +352,7 @@ public:
virtual void writeOutgoingData() virtual void writeOutgoingData()
{ {
assert(!_outBuffer.empty()); assert(!_outBuffer.empty());
while (!_outBuffer.empty()) do
{ {
ssize_t len; ssize_t len;
do do
@ -363,8 +363,7 @@ public:
if (len > 0) if (len > 0)
{ {
_outBuffer.erase(_outBuffer.begin(), _outBuffer.erase(_outBuffer.begin(), _outBuffer.begin() + len);
_outBuffer.begin() + len);
} }
else else
{ {
@ -372,6 +371,7 @@ public:
break; break;
} }
} }
while (!_outBuffer.empty());
} }
/// Override to handle reading of socket data differently. /// Override to handle reading of socket data differently.