File: fix-ets-leak.patch

package info (click to toggle)
rabbitmq-server 2.8.4-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,928 kB
  • sloc: erlang: 52,968; python: 2,846; xml: 1,987; sh: 816; makefile: 683; perl: 86; ruby: 63
file content (13 lines) | stat: -rw-r--r-- 597 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/rfc4627_jsonrpc_registry.erl b/src/rfc4627_jsonrpc_registry.erl
index 7065a7a..f9c8289 100644
--- a/src/rfc4627_jsonrpc_registry.erl
+++ b/src/rfc4627_jsonrpc_registry.erl
@@ -81,7 +81,7 @@ handle_info({'DOWN', _MonitorRef, process, DownPid, _Reason}, State) ->
     case ets:lookup(?TABLE_NAME, {service_pid, DownPid}) of
         [] ->
             {noreply, State};
-        [ServiceName] ->
+        [{_, ServiceName}] ->
             ets:delete(?TABLE_NAME, {service_pid, DownPid}),
             ets:delete(?TABLE_NAME, {service, ServiceName}),
             {noreply, State}