From 79124c6e5c2fa435d67ebdfefe455dccd643745c Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Thu, 11 Dec 2025 14:49:05 +0800 Subject: [PATCH] improve join protocol --- src/controller/join.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/controller/join.c b/src/controller/join.c index bb55e35..d04bdc3 100644 --- a/src/controller/join.c +++ b/src/controller/join.c @@ -82,6 +82,7 @@ static int handle_scheduler_join(cluster_t* c, endpoint_t* ep, { xce_reply_t reply; ep_private_t* priv = (ep_private_t*)ep->data; + int rc = 0; TRACE("%s scheduler join, ep %p", __func__, ep); @@ -90,13 +91,13 @@ static int handle_scheduler_join(cluster_t* c, endpoint_t* ep, c->sched.ep = ep; priv->u.idx = 0; - reply.status = 0; + rc = on_scheduler_join(c); + + reply.status = rc; reply.data_which = RequestReply_data_nodata; xce_reply(ep, c->myhost, &reply); - on_scheduler_join(c); - - return 0; + return rc; } static int handle_controller_join(cluster_t* c, endpoint_t* ep,