[wing] pipeconnection: call DisconnectNamedPipe when finalizing the object
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wing] pipeconnection: call DisconnectNamedPipe when finalizing the object
- Date: Wed, 28 Nov 2018 08:10:11 +0000 (UTC)
commit d406863cf75f559fed66dfadc73e92840b606530
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Tue Nov 27 16:37:03 2018 +0100
pipeconnection: call DisconnectNamedPipe when finalizing the object
This way we ensure the other side of the connection gets properly
disconnected.
wing/wingnamedpipeconnection.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/wing/wingnamedpipeconnection.c b/wing/wingnamedpipeconnection.c
index 8103566..e3ac37b 100644
--- a/wing/wingnamedpipeconnection.c
+++ b/wing/wingnamedpipeconnection.c
@@ -84,7 +84,10 @@ wing_named_pipe_connection_finalize (GObject *object)
g_object_unref (connection->output_stream);
if (connection->close_handle && connection->handle != INVALID_HANDLE_VALUE)
- CloseHandle (connection->handle);
+ {
+ DisconnectNamedPipe (connection->handle);
+ CloseHandle (connection->handle);
+ }
G_OBJECT_CLASS (wing_named_pipe_connection_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]