From 89c51ff069b0bd4c48f4e55ef594864e33ff55e2 Mon Sep 17 00:00:00 2001 From: Christien Rioux Date: Sat, 2 Mar 2024 18:12:55 -0500 Subject: [PATCH] fix hang on shutdown --- veilid-flutter/lib/veilid_ffi.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/veilid-flutter/lib/veilid_ffi.dart b/veilid-flutter/lib/veilid_ffi.dart index b6e00ba3..49df9eaf 100644 --- a/veilid-flutter/lib/veilid_ffi.dart +++ b/veilid-flutter/lib/veilid_ffi.dart @@ -479,6 +479,7 @@ Stream processStreamJson( } case messageStreamClose: { + port.close(); break; } default: @@ -1551,6 +1552,7 @@ class VeilidFFI extends Veilid { final recvPort = ReceivePort('shutdown_veilid_core'); final sendPort = recvPort.sendPort; _shutdownVeilidCore(sendPort.nativePort); + return processFutureVoid(recvPort.first); }