THRIFT-4994 changed this to self in forEach callback
Client: nodejs
Patch: Eugen Kandakov

This closes #1918
diff --git a/lib/nodejs/lib/thrift/ws_transport.js b/lib/nodejs/lib/thrift/ws_transport.js
index 3513b84..4cf62b9 100644
--- a/lib/nodejs/lib/thrift/ws_transport.js
+++ b/lib/nodejs/lib/thrift/ws_transport.js
@@ -83,8 +83,8 @@
       //If the user made calls before the connection was fully
       //open, send them now
       this.send_pending.forEach(function(elem) {
-         this.socket.send(elem.buf);
-         this.callbacks.push((function() {
+         self.socket.send(elem.buf);
+         self.callbacks.push((function() {
            var clientCallback = elem.cb;
            return function(msg) {
               self.setRecvBuffer(msg);