summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-09-04 15:15:31 +0000
committerStephen D. Huston <shuston@apache.org>2009-09-04 15:15:31 +0000
commit01a5ab3a826bfcb83fe75b038cd2c5545867f27e (patch)
treeafc8b054c566459efada7b610fba1793ee85a82d
parentdc04308e9baefe69ba0150c2ef96f78c46bd475d (diff)
downloadqpid-python-01a5ab3a826bfcb83fe75b038cd2c5545867f27e.tar.gz
Apply patches from QPID-2079
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@811441 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/wcf/src/Apache/Qpid/Interop/CompletionWaiter.cpp6
-rw-r--r--qpid/wcf/src/Apache/Qpid/Interop/MessageWaiter.cpp7
2 files changed, 9 insertions, 4 deletions
diff --git a/qpid/wcf/src/Apache/Qpid/Interop/CompletionWaiter.cpp b/qpid/wcf/src/Apache/Qpid/Interop/CompletionWaiter.cpp
index 4f6746828d..e39ee1b1ae 100644
--- a/qpid/wcf/src/Apache/Qpid/Interop/CompletionWaiter.cpp
+++ b/qpid/wcf/src/Apache/Qpid/Interop/CompletionWaiter.cpp
@@ -53,11 +53,13 @@ CompletionWaiter::CompletionWaiter(AmqpSession^ parent, TimeSpan timeSpan, IntPt
this->qpidFuture = future;
this->asyncCallback = callback;
this->state = state;
+ this->parent = parent;
+ this->thisLock = gcnew Object();
+ // do this after the Completion Waiter is fully initialized, in case of
+ // very small timespan
if (timeSpan != TimeSpan::MaxValue) {
this->timer = gcnew Timer(timeoutCallback, this, timeSpan, TimeSpan::FromMilliseconds(-1));
}
- this->parent = parent;
- this->thisLock = gcnew Object();
}
diff --git a/qpid/wcf/src/Apache/Qpid/Interop/MessageWaiter.cpp b/qpid/wcf/src/Apache/Qpid/Interop/MessageWaiter.cpp
index 4868b9efce..f7a28b0692 100644
--- a/qpid/wcf/src/Apache/Qpid/Interop/MessageWaiter.cpp
+++ b/qpid/wcf/src/Apache/Qpid/Interop/MessageWaiter.cpp
@@ -60,11 +60,14 @@ MessageWaiter::MessageWaiter(InputLink^ parent, TimeSpan timeSpan, bool consumin
else {
this->assigned = true;
}
+ this->parent = parent;
+ this->thisLock = gcnew Object();
+
+ // do this after the Message Waiter is fully initialized, in case of
+ // very small timespan
if (timeSpan != TimeSpan::MaxValue) {
this->timer = gcnew Timer(timeoutCallback, this, timeSpan, TimeSpan::FromMilliseconds(-1));
}
- this->parent = parent;
- this->thisLock = gcnew Object();
}
MessageWaiter::~MessageWaiter()