Skip to content

Commit f4b7a13

Browse files
committed
cosmetic
1 parent 654ceb7 commit f4b7a13

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/rabbit_reader.erl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,13 @@ handle_method0(#'connection.close'{},
678678
State = #v1{connection_state = running}) ->
679679
lists:foreach(fun rabbit_framing_channel:shutdown/1, all_channels()),
680680
maybe_close(State#v1{connection_state = closing});
681-
handle_method0(#'connection.close'{}, State = #v1{connection_state = CS})
681+
handle_method0(#'connection.close'{},
682+
State = #v1{connection_state = CS,
683+
sock = Sock})
682684
when CS =:= closing; CS =:= closed ->
683685
%% We're already closed or closing, so we don't need to cleanup
684686
%% anything.
685-
ok = send_on_channel0(State#v1.sock, #'connection.close_ok'{}),
687+
ok = send_on_channel0(Sock, #'connection.close_ok'{}),
686688
State;
687689
handle_method0(#'connection.close_ok'{},
688690
State = #v1{connection_state = closed}) ->

0 commit comments

Comments
 (0)