don't queue on full write queue

pull/1020/head
Jeff Becker 4 years ago
parent 6d42b5f997
commit 42f721d691
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -225,13 +225,14 @@ namespace libuv
return -1; return -1;
WriteBuffer_t buf(sz); WriteBuffer_t buf(sz);
std::copy_n(data, sz, buf.begin()); std::copy_n(data, sz, buf.begin());
if(m_WriteQueue.pushBack(std::move(buf)) int result = -1;
if(m_WriteQueue.tryPushBack(std::move(buf))
== llarp::thread::QueueReturn::Success) == llarp::thread::QueueReturn::Success)
{ {
uv_async_send(&m_WriteNotify); result = sz;
return sz;
} }
return -1; uv_async_send(&m_WriteNotify);
return sz;
} }
void void

Loading…
Cancel
Save