diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2011-11-17 12:23:21 +0000 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2011-11-17 12:23:21 +0000 |
| commit | e09582b32dc46269349124e835d23b546477a933 (patch) | |
| tree | ccccadc929c85d47de330d169d288cf4147d1de2 /src | |
| parent | e75018d7e8e34c7173e0bf50336a9a5122caf985 (diff) | |
| parent | b76b273cbbbad95529bd6aa5b0ec868cef12f764 (diff) | |
| download | rabbitmq-server-git-e09582b32dc46269349124e835d23b546477a933.tar.gz | |
Merged bug23052 into default
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_guid.erl | 10 | ||||
| -rw-r--r-- | src/rabbit_reader.erl | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/rabbit_guid.erl b/src/rabbit_guid.erl index cf3fea1a53..523af7492d 100644 --- a/src/rabbit_guid.erl +++ b/src/rabbit_guid.erl @@ -76,14 +76,14 @@ guid() -> %% now() to move ahead of the system time), and b) it is really %% slow since it takes a global lock and makes a system call. %% - %% A persisted serial number, in combination with self/0 (which - %% includes the node name) uniquely identifies a process in space + %% A persisted serial number, the node, and a unique reference + %% (per node incarnation) uniquely identifies a process in space %% and time. We combine that with a process-local counter to give %% us a GUID. G = case get(guid) of - undefined -> {{gen_server:call(?SERVER, serial, infinity), self()}, - 0}; - {S, I} -> {S, I+1} + undefined -> Serial = gen_server:call(?SERVER, serial, infinity), + {{Serial, node(), make_ref()}, 0}; + {S, I} -> {S, I+1} end, put(guid, G), erlang:md5(term_to_binary(G)). diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index b359f7d452..694abd9e49 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -281,7 +281,7 @@ handle_other({conserve_memory, Conserve}, Deb, State) -> handle_other({channel_closing, ChPid}, Deb, State) -> ok = rabbit_channel:ready_for_close(ChPid), channel_cleanup(ChPid), - mainloop(Deb, State); + mainloop(Deb, maybe_close(State)); handle_other({'EXIT', Parent, Reason}, _Deb, State = #v1{parent = Parent}) -> terminate(io_lib:format("broker forced connection closure " "with reason '~w'", [Reason]), State), |
