Repository: qpid-proton
Updated Branches:
  refs/heads/master b47ebb7e4 -> 9adbca281


PROTON-1336: make reactor teardown sequence work with Windows io objects


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/9adbca28
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/9adbca28
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/9adbca28

Branch: refs/heads/master
Commit: 9adbca2818a0aaf860f7d0854e6267d08117a2b1
Parents: b47ebb7
Author: Clifford Jansen <cliffjan...@apache.org>
Authored: Thu Dec 1 12:10:22 2016 -0800
Committer: Clifford Jansen <cliffjan...@apache.org>
Committed: Thu Dec 1 12:10:22 2016 -0800

----------------------------------------------------------------------
 proton-c/src/reactor/io/windows/io.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9adbca28/proton-c/src/reactor/io/windows/io.c
----------------------------------------------------------------------
diff --git a/proton-c/src/reactor/io/windows/io.c 
b/proton-c/src/reactor/io/windows/io.c
index 3ae6722..07692d1 100644
--- a/proton-c/src/reactor/io/windows/io.c
+++ b/proton-c/src/reactor/io/windows/io.c
@@ -92,8 +92,11 @@ void pn_io_initialize(void *obj)
 void pn_io_finalize(void *obj)
 {
   pn_io_t *io = (pn_io_t *) obj;
-  pn_error_free(io->error);
+  pn_selector_t *sel = io->iocp->selector;
   pn_free(io->iocp);
+  if (sel)
+    pn_decref(sel);
+  pn_error_free(io->error);
   WSACleanup();
 }
 
@@ -368,8 +371,10 @@ bool pn_wouldblock(pn_io_t *io)
 
 pn_selector_t *pn_io_selector(pn_io_t *io)
 {
-  if (io->iocp->selector == NULL)
+  if (io->iocp->selector == NULL) {
     io->iocp->selector = pni_selector_create(io->iocp);
+    pn_incref(io->iocp->selector);
+  }
   return io->iocp->selector;
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to