1 --- a/src/rabbit_stomp.erl Wed Apr 30 15:05:33 2008 +0100
2 +++ b/src/rabbit_stomp.erl Wed Apr 30 16:48:11 2008 +0100
3 @@ -105,7 +105,13 @@
4 {tcp, _Sock, Bytes} ->
5 process_received_bytes(Bytes, State);
6 {tcp_closed, _Sock} ->
7 - done;
8 + case State#state.channel of
9 + none ->
10 + done;
11 + ChPid ->
12 + rabbit_channel:shutdown(ChPid),
13 + ?MODULE:mainloop(State)
14 + end;
15 {send_command, Command} ->
16 ?MODULE:mainloop(send_reply(Command, State));
17 {send_command_and_notify, QPid, TxPid, Method, Content} ->