summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/travel-contribution/src
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/travelsample/travel-contribution/src')
-rw-r--r--sandbox/travelsample/travel-contribution/src/scatours/travel/TravelImpl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/sandbox/travelsample/travel-contribution/src/scatours/travel/TravelImpl.java b/sandbox/travelsample/travel-contribution/src/scatours/travel/TravelImpl.java
index e4a641e1e5..e5cc0cae8f 100644
--- a/sandbox/travelsample/travel-contribution/src/scatours/travel/TravelImpl.java
+++ b/sandbox/travelsample/travel-contribution/src/scatours/travel/TravelImpl.java
@@ -87,7 +87,9 @@ public class TravelImpl implements TravelSearch, SearchCallback, TravelBooking{
while (responsesReceived < 3){
try {
- this.wait();
+ synchronized (this) {
+ this.wait();
+ }
} catch (InterruptedException ex){
// do nothing
}
@@ -114,7 +116,9 @@ public class TravelImpl implements TravelSearch, SearchCallback, TravelBooking{
responsesReceived++;
try {
- this.notifyAll();
+ synchronized (this) {
+ this.notifyAll();
+ }
} catch (Exception ex) {
}
}