diff options
author | Matthias Radestock <matthias@lshift.net> | 2010-02-04 22:53:27 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@lshift.net> | 2010-02-04 22:53:27 +0000 |
commit | 8e3eefdae02e2f4cb0b2f8822d77ed0851441c78 (patch) | |
tree | 9ae46a3c904c4c24c2bc518d4d49b6614c41256a | |
parent | 74d696a9f52cf7d627a37d0749417032b9505f37 (diff) | |
download | rabbitmq-server-8e3eefdae02e2f4cb0b2f8822d77ed0851441c78.tar.gz |
docs
-rw-r--r-- | docs/rabbitmqctl.1.pod | 7 | ||||
-rw-r--r-- | src/rabbit_control.erl | 13 |
2 files changed, 13 insertions, 7 deletions
diff --git a/docs/rabbitmqctl.1.pod b/docs/rabbitmqctl.1.pod index 47c4d168..6f783998 100644 --- a/docs/rabbitmqctl.1.pod +++ b/docs/rabbitmqctl.1.pod @@ -98,6 +98,13 @@ nodes determined by I<clusternode> option(s). See L<http://www.rabbitmq.com/clustering.html> for more information about clustering. +=item close_connection I<connectionpid> I<explanation> + +Instruct the broker to close the connection associated with the Erlang +process id I<connectionpid> (see also the I<list_connections> +command), passing the I<explanation> string to the connected client as +part of the AMQP connection shutdown protocol. + =back =head2 USER MANAGEMENT diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index f7518399..2ea64753 100644 --- a/src/rabbit_control.erl +++ b/src/rabbit_control.erl @@ -142,6 +142,7 @@ Available commands: cluster <ClusterNode> ... status rotate_logs [Suffix] + close_connection <ConnectionPid> <ExplanationString> add_user <UserName> <Password> delete_user <UserName> @@ -162,8 +163,6 @@ Available commands: list_bindings [-p <VHostPath>] list_connections [<ConnectionInfoItem> ...] - close_connection <ConnectionPid> <ExplanationString> - Quiet output mode is selected with the \"-q\" flag. Informational messages are suppressed when quiet mode is in effect. @@ -240,6 +239,11 @@ action(rotate_logs, Node, Args = [Suffix], Inform) -> Inform("Rotating logs to files with suffix ~p", [Suffix]), call(Node, {rabbit, rotate_logs, Args}); +action(close_connection, Node, [PidStr, Explanation], Inform) -> + Inform("Closing connection ~s", [PidStr]), + rpc_call(Node, rabbit_reader, shutdown, + [rabbit_misc:string_to_pid(PidStr), Explanation]); + action(add_user, Node, Args = [Username, _Password], Inform) -> Inform("Creating user ~p", [Username]), call(Node, {rabbit_access_control, add_user, Args}); @@ -306,11 +310,6 @@ action(list_connections, Node, Args, Inform) -> [ArgAtoms]), ArgAtoms); -action(close_connection, Node, [PidStr, Explanation], Inform) -> - Inform("Closing connection ~s", [PidStr]), - rpc_call(Node, rabbit_reader, shutdown, - [rabbit_misc:string_to_pid(PidStr), Explanation]); - action(Command, Node, Args, Inform) -> {VHost, RemainingArgs} = parse_vhost_flag(Args), action(Command, Node, VHost, RemainingArgs, Inform). |