fix crash

This commit is contained in:
Jeff Becker 2019-02-25 07:51:01 -05:00
parent 08d70e6d14
commit 89a8c9248d
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -87,7 +87,7 @@ namespace llarp
return; return;
m_TXRate += s; m_TXRate += s;
size_t sz = s; size_t sz = s;
while(sz >= vecq.front().iov_len) while(vecq.size() && sz >= vecq.front().iov_len)
{ {
sz -= vecq.front().iov_len; sz -= vecq.front().iov_len;
vecq.pop_front(); vecq.pop_front();