Skip to content

Commit

Permalink
Merge pull request #861 from majestrate/call-read-in-logic
Browse files Browse the repository at this point in the history
call read handler in logic thread
  • Loading branch information
notlesh committed Oct 11, 2019
2 parents 2cf1045 + b7601a6 commit 8e8abbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llarp/ev/ev_libuv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ namespace libuv
if(nread >= 0)
{
auto* conn = static_cast< conn_glue* >(stream->data);
conn->Read(buf->base, nread);
Call(stream, std::bind(&conn_glue::Read, conn, buf->base, nread));
return;
}
else if(nread < 0)
{
Expand All @@ -135,6 +136,7 @@ namespace libuv
const llarp_buffer_t buf(ptr, sz);
m_Conn.read(&m_Conn, buf);
}
delete[] ptr;
}

void
Expand Down

0 comments on commit 8e8abbc

Please sign in to comment.