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:
parent
6d42b5f997
commit
42f721d691
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue