From c8629fe5b57d1a95f725dd92573732f0be5866a9 Mon Sep 17 00:00:00 2001 From: eugene Date: Tue, 22 Oct 2024 14:40:19 -0400 Subject: [PATCH 1/2] do not try binding if session had not been received yet --- library/bind.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/bind.c b/library/bind.c index a06d93fb..556115aa 100644 --- a/library/bind.c +++ b/library/bind.c @@ -250,7 +250,9 @@ static void list_routers_cb(ziti_service_routers *srv_routers, const ziti_error } free(srv_routers); - process_bindings(conn); + if (conn->server.token != NULL) { + process_bindings(conn); + } } static void get_service_cb(ziti_context ztx, const ziti_service *service, int status, void *ctx) { From e73a30c1ae232cb196d5a8d8868802858e1787b9 Mon Sep 17 00:00:00 2001 From: eugene Date: Tue, 22 Oct 2024 15:12:01 -0400 Subject: [PATCH 2/2] do not try binding if session had not been received yet --- library/bind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/bind.c b/library/bind.c index 556115aa..2731848a 100644 --- a/library/bind.c +++ b/library/bind.c @@ -193,8 +193,8 @@ static void session_cb(ziti_session *session, const ziti_error *err, void *ctx) conn->server.routers[idx++] = er; } model_list_clear(&session->edge_routers, NULL); - process_bindings(conn); } + process_bindings(conn); notify_status(conn, ZITI_OK); break;