[vlma-devel] commit: Wait for the telnet session to be initialized before sending commands. ( Adrien Grand )

git version control git at videolan.org
Tue Sep 16 20:11:53 CEST 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Mon Sep 15 20:35:25 2008 +0200| [b922a41f0ee6159ccc691812f98ed31ab750718d] | committer: Adrien Grand 

Wait for the telnet session to be initialized before sending commands.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=b922a41f0ee6159ccc691812f98ed31ab750718d
---

 .../java/org/videolan/vlma/order/OrderSender.java  |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/order/OrderSender.java b/vlma-core/src/main/java/org/videolan/vlma/order/OrderSender.java
index 8559fbb..4ddabb9 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/order/OrderSender.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/order/OrderSender.java
@@ -79,6 +79,11 @@ public abstract class OrderSender {
         telnetOut = new PrintWriter(telnetSocket.getOutputStream(), true);
         telnetIn = new BufferedReader(new InputStreamReader(telnetSocket.getInputStream()));
         telnetOut.println(configuration.getString("vlc.telnet.password"));
+        // Wait for the telnet session to be initialized before sending commands
+        try {
+            Thread.sleep(configuration.getInt("vlc.telnet.delay"));
+        } catch (InterruptedException e) {
+        }
     }
 
     /**



More information about the vlma-devel mailing list