THRIFT-4131: js / WebSocket / fix handling oneway methods
Client: js
Patch: Martin Hejnfelt <mh@newtec.dk>
This closes #1372
diff --git a/lib/js/src/thrift.js b/lib/js/src/thrift.js
index 37ba690..ab85e9d 100644
--- a/lib/js/src/thrift.js
+++ b/lib/js/src/thrift.js
@@ -575,6 +575,15 @@
clientCallback();
};
}()));
+ if(callback) {
+ this.callbacks.push((function() {
+ var clientCallback = callback;
+ return function(msg) {
+ self.setRecvBuffer(msg);
+ clientCallback();
+ };
+ }()));
+ }
} else {
//Queue the send to go out __onOpen
this.send_pending.push({