diff --git a/include/web-socket-js/web_socket.js b/include/web-socket-js/web_socket.js index 2a7da35c..48ec0fcb 100755 --- a/include/web-socket-js/web_socket.js +++ b/include/web-socket-js/web_socket.js @@ -165,8 +165,9 @@ if (this.__timer) clearInterval(this.__timer); if (window.opera) { // Workaround for weird behavior of Opera which sometimes drops events. + var that = this; this.__timer = setInterval(function () { - this.__handleEvents(); + that.__handleEvents(); }, 500); } if (this.onopen) this.onopen();