diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2010-07-23 10:36:04 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2010-07-23 10:36:04 +0100 |
commit | 9a911110abd55978674f3ba59b5111a267f0e6a7 (patch) | |
tree | 37dd7666297b05feccf3a558ff40277ee78168ad | |
parent | 8902d86cd90286dc78c2649bb8cf90897cfc538e (diff) | |
download | rabbitmq-server-9a911110abd55978674f3ba59b5111a267f0e6a7.tar.gz |
Base the connection_created event on the updated state; needed to get vhost name.
-rw-r--r-- | src/rabbit_reader.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index ab157063..4cf47208 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -681,11 +681,12 @@ handle_method0(#'connection.open'{virtual_host = VHostPath, ok = send_on_channel0( Sock, #'connection.open_ok'{known_hosts = KnownHosts}), + State1 = State#v1{connection_state = running, + connection = NewConnection}, rabbit_event:notify( connection_created, - [{Item, i(Item, State)} || Item <- [pid|?CREATION_EVENT_KEYS]]), - State#v1{connection_state = running, - connection = NewConnection}; + [{Item, i(Item, State1)} || Item <- [pid|?CREATION_EVENT_KEYS]]), + State1; true -> %% FIXME: 'host' is supposed to only contain one %% address; but which one do we pick? This is |