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 | 1b5bcc5a1207263bd1a8047a1104da97a76da3ef (patch) | |
| tree | 37dd7666297b05feccf3a558ff40277ee78168ad /src | |
| parent | 2d84cfa0cd2fe037b9623e81aecffa95875fe3b2 (diff) | |
| download | rabbitmq-server-git-1b5bcc5a1207263bd1a8047a1104da97a76da3ef.tar.gz | |
Base the connection_created event on the updated state; needed to get vhost name.
Diffstat (limited to 'src')
| -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 ab1570634e..4cf47208f7 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 |
