[sr-dev] git:master:b3c8329c: nats: fix the nats:connected event_route not being triggered on a successful connect
Henning Westerholt
hw at gilawa.com
Mon Jun 20 19:16:18 CEST 2022
Module: kamailio
Branch: master
Commit: b3c8329cfbfa19613dfbadaea7f220443dbb7f55
URL: https://github.com/kamailio/kamailio/commit/b3c8329cfbfa19613dfbadaea7f220443dbb7f55
Author: Seven Du <dujinfang at x-y-t.cn>
Committer: Henning Westerholt <hw at gilawa.com>
Date: 2022-06-20T19:16:13+02:00
nats: fix the nats:connected event_route not being triggered on a successful connect
---
Modified: src/modules/nats/nats_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/b3c8329cfbfa19613dfbadaea7f220443dbb7f55.diff
Patch: https://github.com/kamailio/kamailio/commit/b3c8329cfbfa19613dfbadaea7f220443dbb7f55.patch
---
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);
More information about the sr-dev
mailing list