File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -802,12 +802,25 @@ Dash.prototype._initZmqSubSocket = function(node, zmqUrl) {
802
802
var self = this ;
803
803
node . zmqSubSocket = zmq . socket ( 'sub' ) ;
804
804
805
+ log . info ( `ZMQ opening socket to '${ zmqUrl } '` ) ;
806
+
807
+ // workaround for https://github.com/zeromq/zeromq.js/issues/574
808
+ var timeout = setTimeout ( function ( ) {
809
+ // neither accepting nor rejecting - either invalid or firewalled (DROP)
810
+ log . error ( `ZMQ address '${ zmqUrl } ' cannot be reached` ) ;
811
+ process . exit ( 1 ) ;
812
+ } , 5 * 1000 ) ;
813
+
805
814
node . zmqSubSocket . on ( 'connect' , function ( fd , endPoint ) {
806
815
log . info ( 'ZMQ connected to:' , endPoint ) ;
816
+ clearTimeout ( timeout ) ;
817
+ timeout = null ;
807
818
} ) ;
808
819
809
820
node . zmqSubSocket . on ( 'connect_delay' , function ( fd , endPoint ) {
810
821
log . warn ( 'ZMQ connection delay:' , endPoint ) ;
822
+ clearTimeout ( timeout ) ;
823
+ timeout = null ;
811
824
} ) ;
812
825
813
826
node . zmqSubSocket . on ( 'disconnect' , function ( fd , endPoint ) {
You can’t perform that action at this time.
0 commit comments