tests: defer face deallocation in Face/TestTcp and Face/TestWebSocket
Deallocating face immediately at face closing would cause a Signal object
in the transport to be destructed during its execution, which is disallowed.
refs #3322
Change-Id: I4eb23f34305cfecf7d2122e94454a97353707818
diff --git a/tests/daemon/face/websocket.t.cpp b/tests/daemon/face/websocket.t.cpp
index ee98bf3..f790cf4 100644
--- a/tests/daemon/face/websocket.t.cpp
+++ b/tests/daemon/face/websocket.t.cpp
@@ -112,8 +112,10 @@
void
face1_onFail()
{
- face1.reset();
- limitedIo.afterOp();
+ g_io.post([this] {
+ face1.reset();
+ limitedIo.afterOp();
+ });
}
void