[wing/wip/nacho/poll-stream] Fix closing stream
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wing/wip/nacho/poll-stream] Fix closing stream
- Date: Wed, 28 Nov 2018 15:30:40 +0000 (UTC)
commit 9c1fef9cf115dc49cfe6a6982c87d19216f0697a
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Wed Nov 28 16:28:44 2018 +0100
Fix closing stream
wing/winginputstream.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/wing/winginputstream.c b/wing/winginputstream.c
index 1b5994a..83886ce 100644
--- a/wing/winginputstream.c
+++ b/wing/winginputstream.c
@@ -228,7 +228,7 @@ wing_input_stream_close (GInputStream *stream,
wing_stream = WING_INPUT_STREAM (stream);
priv = wing_input_stream_get_instance_private (wing_stream);
- if (!priv->close_handle)
+ if (priv->close_handle == INVALID_HANDLE_VALUE)
return TRUE;
res = CloseHandle (priv->handle);
@@ -245,6 +245,8 @@ wing_input_stream_close (GInputStream *stream,
return FALSE;
}
+ priv->handle = INVALID_HANDLE_VALUE;
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]