From 6111722534b15bd49b944f1e9edb8e900df39e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=A4=B4=E4=BA=91?= Date: Sun, 14 May 2023 14:11:54 +0800 Subject: [PATCH] fix: the receiver of channel will hang after disconnect --- src/libipc/ipc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libipc/ipc.cpp b/src/libipc/ipc.cpp index 4dc71c0..f09f972 100755 --- a/src/libipc/ipc.cpp +++ b/src/libipc/ipc.cpp @@ -533,7 +533,7 @@ static ipc::buff_t recv(ipc::handle_t h, std::uint64_t tm) { auto& rc = info_of(h)->recv_cache(); for (;;) { // 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] { return !que->pop(msg); }, tm)) {