Skip to content

Commit

Permalink
fix: handle terminate message from proxy client (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
abc3 authored Jan 23, 2025
1 parent a14b2af commit fd447e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.20
2.0.21
5 changes: 5 additions & 0 deletions lib/supavisor/client_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,11 @@ defmodule Supavisor.ClientHandler do
data: term()

# handle Terminate message
defp handle_data(:info, <<?X, 4::32>>, :idle, %{local: true}) do
Logger.info("ClientHandler: Terminate received from proxy client")
:keep_state_and_data
end

defp handle_data(:info, <<?X, 4::32>>, :idle, _data) do
Logger.info("ClientHandler: Terminate received from client")
{:stop, {:shutdown, :terminate_received}}
Expand Down

0 comments on commit fd447e8

Please sign in to comment.