1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

don't queue on full write queue

This commit is contained in:
Jeff Becker 2020-01-06 16:43:15 -05:00
parent 6d42b5f997
commit 42f721d691
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -225,13 +225,14 @@ namespace libuv
return -1;
WriteBuffer_t buf(sz);
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)
{
uv_async_send(&m_WriteNotify);
return sz;
result = sz;
}
return -1;
uv_async_send(&m_WriteNotify);
return sz;
}
void