We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bdc3d1 commit 7a0432aCopy full SHA for 7a0432a
zmq-pub.js
@@ -15,11 +15,17 @@ var socket = zmq.socket('pub');
15
socket.identity = 'publisher' + process.pid;
16
17
socket.bind(address, function(err) {
18
- var doit = function() {
19
- var time = new Date().getTime();
20
- socket.send('TIME ' + time);
21
- stats.updateCounts();
22
- process.nextTick(doit);
+ if (err) {
+ console.error(err);
+ process.exit(1);
23
}
24
- doit();
25
});
+
+var doit = function() {
+ var time = new Date().getTime();
26
+ socket.send('TIME ' + time);
27
+ stats.updateCounts();
28
+ process.nextTick(doit);
29
+}
30
31
+setTimeout(doit, 1000);
0 commit comments