[wing/wip/nacho/poll-stream] Reset event on canceReset event on cancell



commit b9c36cc12985bfe5689f6f8c98327d929fdc6fd6
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Thu Nov 29 10:30:38 2018 +0100

    Reset event on canceReset event on cancell

 wing/winginputstream.c  | 5 ++++-
 wing/wingoutputstream.c | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/wing/winginputstream.c b/wing/winginputstream.c
index 5343513..851b71b 100644
--- a/wing/winginputstream.c
+++ b/wing/winginputstream.c
@@ -199,7 +199,10 @@ read_internal (GInputStream  *stream,
         }
 
       if (g_cancellable_set_error_if_cancelled (cancellable, error))
-        goto end;
+        {
+          ResetEvent (priv->overlap.hEvent);
+          goto end;
+        }
 
       errsv = GetLastError ();
       if (errsv == ERROR_MORE_DATA)
diff --git a/wing/wingoutputstream.c b/wing/wingoutputstream.c
index 5f75060..8d397c1 100644
--- a/wing/wingoutputstream.c
+++ b/wing/wingoutputstream.c
@@ -200,7 +200,10 @@ write_internal (GOutputStream  *stream,
         }
 
       if (g_cancellable_set_error_if_cancelled (cancellable, error))
-        goto end;
+        {
+          ResetEvent (priv->overlap.hEvent);
+          goto end;
+        }
 
       errsv = GetLastError ();
       if (errsv == ERROR_HANDLE_EOF ||


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]