Prechádzať zdrojové kódy

tcp-client.js: after read, try read again.

After a read completes it's possible more data is pending so issue an
immediate read again to pick this up quickly.
Joel Martin 13 rokov pred
rodič
commit
5f03c3d093
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      include/chrome-app/tcp-client.js

+ 3 - 0
include/chrome-app/tcp-client.js

@@ -249,6 +249,9 @@ Author: Boris Smus (smus@chromium.org)
           this.callbacks.recvString(str);
         }.bind(this));
       }
+
+      // Trigger another read right away
+      setTimeout(this._periodicallyRead.bind(this), 0);
     }
   };