Module: kamailio
Branch: 5.6
Commit: 272649c1c4b718067abc776186529b0e0c40e363
URL:
https://github.com/kamailio/kamailio/commit/272649c1c4b718067abc776186529b0…
Author: Seven Du <dujinfang(a)x-y-t.cn>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-07-04T10:33:56+02:00
nats: fix the nats:connected event_route not being triggered on a successful connect
(cherry picked from commit b3c8329cfbfa19613dfbadaea7f220443dbb7f55)
---
Modified: src/modules/nats/nats_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/272649c1c4b718067abc776186529b0…
Patch:
https://github.com/kamailio/kamailio/commit/272649c1c4b718067abc776186529b0…
---
diff --git a/src/modules/nats/nats_mod.c b/src/modules/nats/nats_mod.c
index 2a53beda82f..6108d555e81 100644
--- a/src/modules/nats/nats_mod.c
+++ b/src/modules/nats/nats_mod.c
@@ -298,7 +298,10 @@ int _nats_pub_worker_proc(
!= NATS_OK) {
LM_ERR("could not connect to nats servers [%s]\n",
natsStatus_GetText(s));
+ } else {
+ connectedCB(worker->nc->conn, NULL);
}
+
s = natsOptions_SetEventLoop(worker->nc->opts, (void *)worker->uvLoop,
natsLibuv_Attach, natsLibuv_Read, natsLibuv_Write,
natsLibuv_Detach);