]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Check socket state before sending data
authorJohannes Zellner <johannes@nebulon.de>
Thu, 31 Aug 2017 18:26:34 +0000 (20:26 +0200)
committerJohannes Zellner <johannes@nebulon.de>
Thu, 31 Aug 2017 18:26:36 +0000 (20:26 +0200)
Maybe related to #929

src/addons/attach/attach.js

index c2a7989b4ebe35014250c71bc2595795017f5103..2e1106249f5070cd0fc8bca9eea4c029290c34f1 100644 (file)
     };
 
     term._sendData = function (data) {
+      if (socket.readyState !== 1) {
+        return;
+      }
+
       socket.send(data);
     };