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); }