diff options
| author | Stephen D. Huston <shuston@apache.org> | 2009-07-07 22:54:59 +0000 |
|---|---|---|
| committer | Stephen D. Huston <shuston@apache.org> | 2009-07-07 22:54:59 +0000 |
| commit | 97f1a0a45081edad67232860f6ae8e0797af0f37 (patch) | |
| tree | 10f0d34a9929614cff4979e25b1cdb78d0ea2b0a /cpp/src | |
| parent | d6e33bec7cd7baa6d6005f55d4472e3862032650 (diff) | |
| download | qpid-python-97f1a0a45081edad67232860f6ae8e0797af0f37.tar.gz | |
Properly handle queued closes originating locally. Fixes QPID-1952
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@791997 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/sys/windows/AsynchIO.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cpp/src/qpid/sys/windows/AsynchIO.cpp b/cpp/src/qpid/sys/windows/AsynchIO.cpp index 88be5d7634..8de2eccc84 100644 --- a/cpp/src/qpid/sys/windows/AsynchIO.cpp +++ b/cpp/src/qpid/sys/windows/AsynchIO.cpp @@ -754,9 +754,14 @@ void AsynchIO::completion(AsynchIoResult *result) { working = false; } // Lock released; ok to close if ops are done and close requested. - // Layer above will call back to queueForDeletion() - if (opsInProgress == 0 && queuedClose) { - close(); + // Layer above will call back to queueForDeletion() if it hasn't + // already been done. If it already has, go ahead and delete. + if (opsInProgress == 0) { + if (queuedClose) + // close() may cause a delete; don't trust 'this' on return + close(); + else if (queuedDelete) + delete this; } } |
