forked from boostorg/beast
Allow concurrent websocket async ping and writes:
fix #271 This modifies the websocket stream implementation's composed operations to allow caller-initiated asynchronous pings and frame/message writes to take place at the same time.
This commit is contained in:
1 parent
31cda067fa
commit
faed9e57f2
8 files changed
+31
-13
No files matched your search
@@ -133,7 +133,7 @@ operator()(error_code ec, bool again)
|
||||
{
|
||||
// suspend
|
||||
d.state = 2;
|
||||
d.ws.wr_op_.template emplace<
|
||||
d.ws.ping_op_.template emplace<
|
||||
ping_op>(std::move(*this));
|
||||
return;
|
||||
}
|
||||
@@ -188,7 +188,8 @@ operator()(error_code ec, bool again)
|
||||
upcall:
|
||||
if(d.ws.wr_block_ == &d)
|
||||
d.ws.wr_block_ = nullptr;
|
||||
d.ws.rd_op_.maybe_invoke();
|
||||
d.ws.rd_op_.maybe_invoke() ||
|
||||
d.ws.wr_op_.maybe_invoke();
|
||||
d_.invoke(ec);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user