aboutsummaryrefslogtreecommitdiffstats
path: root/lib/percept
diff options
context:
space:
mode:
authorAhmed Omar <[email protected]>2011-06-06 10:19:16 +0200
committerHenrik Nord <[email protected]>2011-08-24 15:56:38 +0200
commitc52f5a6220534b9ebd153d5520bc6a01006d7749 (patch)
tree7d41dd543fd268b83303acf308116df537bbe74f /lib/percept
parentf6a77186a608fb08e2ffc65d06c4166b7127e4a0 (diff)
downloadotp-c52f5a6220534b9ebd153d5520bc6a01006d7749.tar.gz
otp-c52f5a6220534b9ebd153d5520bc6a01006d7749.tar.bz2
otp-c52f5a6220534b9ebd153d5520bc6a01006d7749.zip
Add demonitor to avoid keeping DOWN message in the queue
fix one spec in do_start/0
Diffstat (limited to 'lib/percept')
-rw-r--r--lib/percept/src/percept_db.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/percept/src/percept_db.erl b/lib/percept/src/percept_db.erl
index 52e9afb78f..e827b5345c 100644
--- a/lib/percept/src/percept_db.erl
+++ b/lib/percept/src/percept_db.erl
@@ -92,7 +92,7 @@ restart(PerceptDB)->
stop_sync(PerceptDB),
do_start().
-%% @spec do_start(pid()) -> pid()
+%% @spec do_start() -> pid()
%% @private
%% @doc starts the percept database.
@@ -131,6 +131,7 @@ stop_sync(Pid)->
{'DOWN', MonitorRef, _Type, Pid, _Info}->
true
after ?STOP_TIMEOUT->
+ erlang:demonitor(MonitorRef, [flush]),
exit(Pid, kill)
end.