[vlma-devel] commit: Wait after having sent orders to ensure servers can start streaming before ServerMonitor runs . (Adrien Grand )
git version control
git at videolan.org
Thu Sep 11 17:46:29 CEST 2008
vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Thu Sep 11 16:11:26 2008 +0200| [6e35144f06cf024218cc97b784642d6d6770ebd4] | committer: Adrien Grand
Wait after having sent orders to ensure servers can start streaming before ServerMonitor runs.
> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=6e35144f06cf024218cc97b784642d6d6770ebd4
---
.../main/java/org/videolan/vlma/OrderGiver.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java b/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java
index 30006a0..e5dd5b2 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java
@@ -69,6 +69,9 @@ public class OrderGiver {
private static final Logger logger = Logger.getLogger(OrderGiver.class);
+ // Time to sleep after orders have been sent
+ public static final int SLEEP_AFTER_ORDERS = 5000;
+
private VLMaService vlmaService;
private OrderSender orderSender;
@@ -336,6 +339,12 @@ public class OrderGiver {
}
}
logger.info("Orders sent in " + (System.currentTimeMillis() - start) + "ms");
+ // Ensure that servers have enough time to effectively start
+ // streaming orders that have been assigned to them before
+ // OrderMonitor can check whether orders are streamed or not.
+ try {
+ Thread.sleep(SLEEP_AFTER_ORDERS);
+ } catch (InterruptedException e) { }
}
};
More information about the vlma-devel
mailing list