diff --git a/fluxer_gateway/src/gateway/gateway_cluster_handoff.erl b/fluxer_gateway/src/gateway/gateway_cluster_handoff.erl index dce66f55a..164a59977 100644 --- a/fluxer_gateway/src/gateway/gateway_cluster_handoff.erl +++ b/fluxer_gateway/src/gateway/gateway_cluster_handoff.erl @@ -4,7 +4,7 @@ -typing([eqwalizer]). -behaviour(gen_server). --export([start_link/0, drain_async/0, undrain/0, diagnostic_info/0]). +-export([start_link/0, drain_async/0, drain_notify_role/0, undrain/0, diagnostic_info/0]). -export([ init/1, handle_call/3, diff --git a/fluxer_gateway/src/gateway/gateway_shutdown_drain.erl b/fluxer_gateway/src/gateway/gateway_shutdown_drain.erl index 72f1fdb84..b19fe1efb 100644 --- a/fluxer_gateway/src/gateway/gateway_shutdown_drain.erl +++ b/fluxer_gateway/src/gateway/gateway_shutdown_drain.erl @@ -17,10 +17,7 @@ run() -> -spec drain() -> ok. drain() -> persistent_term:put({fluxer_gateway, draining}, true), - Result = shard_utils:safe_apply( - fun session_manager:reconnect_drain/0, - {error, unavailable} - ), - logger:info("Gateway shutdown drain: ~p", [Result]), + ok = gateway_cluster_handoff:drain_notify_role(), + logger:info("Gateway shutdown drain: notified clients"), timer:sleep(?FRAME_FLUSH_MS), ok.