mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
fix: the receiver of channel will hang after disconnect
This commit is contained in:
parent
2a2b626210
commit
6111722534
@ -533,7 +533,7 @@ static ipc::buff_t recv(ipc::handle_t h, std::uint64_t tm) {
|
|||||||
auto& rc = info_of(h)->recv_cache();
|
auto& rc = info_of(h)->recv_cache();
|
||||||
for (;;) {
|
for (;;) {
|
||||||
// pop a new message
|
// pop a new message
|
||||||
typename queue_t::value_t msg;
|
typename queue_t::value_t msg {};
|
||||||
if (!wait_for(info_of(h)->rd_waiter_, [que, &msg] {
|
if (!wait_for(info_of(h)->rd_waiter_, [que, &msg] {
|
||||||
return !que->pop(msg);
|
return !que->pop(msg);
|
||||||
}, tm)) {
|
}, tm)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user