Skip to content

Commit

Permalink
Added a temporary fix for JustinTulloss/zeromq.node#124
Browse files Browse the repository at this point in the history
  • Loading branch information
ysimonson committed Jul 25, 2012
1 parent a56e9ef commit 239954b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/socket.js
Expand Up @@ -31,9 +31,6 @@ var nodeUtil = require("util"),
//The default channel capacity
var CHANNEL_CAPACITY = 100;

//How long to wait before sending a message if a remote buffer is full
var REMOTE_WAIT_TIMEOUT = 1000;

//Creates a new socket
//zmqSocket : Object
// The underlying ZeroMQ socket to use
Expand Down Expand Up @@ -109,6 +106,10 @@ function MultiplexingSocket(zmqSocket) {
self.emit("multiplexing-socket/receive", event);
}
});

//Fix for https://github.com/JustinTulloss/zeromq.node/issues/124
//TODO: remove when this is fixed
self._keepaliveTimer = setInterval(function() {}, 60000);
}

nodeUtil.inherits(MultiplexingSocket, Socket);
Expand All @@ -132,6 +133,9 @@ MultiplexingSocket.prototype.openChannel = function(srcEvent) {
MultiplexingSocket.prototype.close = function() {
this._zmqSocket.close();
for(var id in this.channels) this.channels[id].close();

//TODO: remove when this is fixed
clearTimeout(this._keepaliveTimer);
};

//Creates a new multiplexing socket server
Expand Down

0 comments on commit 239954b

Please sign in to comment.