File tree 3 files changed +6
-0
lines changed
3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ module.exports = class Amqp extends Component.mixin(AsyncEmitter) {
12
12
this . logger = logger ;
13
13
this . _connection ;
14
14
this . _initializing = false ;
15
+ this . serviceSub = null ;
16
+ this . serviceSubQueue = null ;
15
17
}
16
18
17
19
initialize ( ) {
@@ -57,6 +59,8 @@ module.exports = class Amqp extends Component.mixin(AsyncEmitter) {
57
59
this . logger . warn ( "Failed to connect to rmq." , e ) ;
58
60
yield sleep ( 3000 ) ;
59
61
this . logger . info ( "Attempting to reconnect to rmq." ) ;
62
+ this . serviceSub . _initializing = false ;
63
+ this . serviceSubQueue . _initializing = false ;
60
64
61
65
yield this . doConnect ( ) ;
62
66
}
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ class ServiceSubRabbit extends ServiceSubQueue {
13
13
this . logger = logger ;
14
14
this . injector = injector ;
15
15
this . amqp = amqp ;
16
+ this . amqp . serviceSubQueue = this ;
16
17
17
18
this . SERVICE_NAME = config . default ( "name" , "unnamed-service" ) ;
18
19
this . VERSION = pack . version ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class ServiceSubRabbit extends ServiceSub {
14
14
this . logger = logger ;
15
15
this . injector = injector ;
16
16
this . amqp = amqp ;
17
+ this . amqp . serviceSub = this ;
17
18
this . servicePubRabbit = servicePubRabbit ;
18
19
19
20
this . SERVICE_NAME = config . default ( "name" , "unnamed-service" ) ;
You can’t perform that action at this time.
0 commit comments