changeset 228:c9a7f33b53a8

delay testChanged() by 10ms for async transports
author Carl Byington <carl@five-ten-sg.com>
date Wed, 09 Jul 2014 09:05:05 -0700
parents 2dd627df4dfb
children 594101a0876a
files src/com/five_ten_sg/connectbot/service/Relay.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/service/Relay.java	Wed Jul 09 09:03:04 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/service/Relay.java	Wed Jul 09 09:05:05 2014 -0700
@@ -120,12 +120,13 @@
                 offset = byteBuffer.arrayOffset() + byteBuffer.limit();
 
                 if (transport.willBlock()) {
-                    task = new TimerTask(){
+                    task = new TimerTask() {
                         public void run() {
                             buffer.testChanged();
                         }
                     };
                     timer.schedule(task, 10);   // 10 ms delay
+                }
 
                 bytesRead = transport.read(byteArray, offset, bytesToRead);