diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-13 06:01:45 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-13 06:01:45 +0100 |
| commit | 069a765c83acdc32dd1d7e47e592b177ad8a2124 (patch) | |
| tree | dd4ac5a3b7ce38169da28b84173588e94dd16047 | |
| parent | be1808608b530c3b72e706ea4a458f33fb5d1754 (diff) | |
| download | rabbitmq-server-git-069a765c83acdc32dd1d7e47e592b177ad8a2124.tar.gz | |
revert the change from 'stop' to 'flush_stop'
and move the writer:flush call to a place where the need for it is
more obvious.
| -rw-r--r-- | src/rabbit_channel.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index c68bb77dcd..01d0c38e87 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -203,8 +203,7 @@ handle_cast({method, Method, Content}, State) -> noreply(NewState); {noreply, NewState} -> noreply(NewState); - flush_and_stop -> - rabbit_writer:flush(State#ch.writer_pid), + stop -> {stop, normal, State#ch{state = terminating}} catch exit:Reason = #amqp_error{} -> @@ -405,7 +404,8 @@ handle_method(_Method, _, #ch{state = starting}) -> handle_method(#'channel.close'{}, _, State = #ch{writer_pid = WriterPid}) -> ok = rollback_and_notify(State), ok = rabbit_writer:send_command(WriterPid, #'channel.close_ok'{}), - flush_and_stop; + ok = rabbit_writer:flush(WriterPid), + stop; handle_method(#'access.request'{},_, State) -> {reply, #'access.request_ok'{ticket = 1}, State}; |
