aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-05-08 13:42:36 +0200
committerHans Bolinder <[email protected]>2018-05-08 13:42:36 +0200
commit41ea54fd4e6cb54f5dffed3163468dd9bb5e347f (patch)
treea9bf6299aee07391c7363d01b9888bcc7c541bd9 /lib
parent837fe8bf4bf3a567c66afec0f0ec3dd70d248cd8 (diff)
downloadotp-41ea54fd4e6cb54f5dffed3163468dd9bb5e347f.tar.gz
otp-41ea54fd4e6cb54f5dffed3163468dd9bb5e347f.tar.bz2
otp-41ea54fd4e6cb54f5dffed3163468dd9bb5e347f.zip
tools: Handle fast restarts of Xref server
Diffstat (limited to 'lib')
-rw-r--r--lib/tools/src/xref.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/tools/src/xref.erl b/lib/tools/src/xref.erl
index 32efa36fa2..466ec7d331 100644
--- a/lib/tools/src/xref.erl
+++ b/lib/tools/src/xref.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2016. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2018. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -182,7 +182,9 @@ split_args(Opts) ->
end.
stop(Name) ->
- gen_server:call(Name, stop, infinity).
+ try gen_server:call(Name, stop, infinity)
+ after catch unregister(Name) % ensure the name is gone
+ end.
add_release(Name, Dir) ->
gen_server:call(Name, {add_release, Dir}, infinity).