aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-05-14 12:54:02 +0200
committerHans Bolinder <[email protected]>2018-05-14 12:54:02 +0200
commit3694847de4ed6ee7bd5dba3bb20dce3964a6be46 (patch)
treeabb36124cda0e35ae052e330e4b68ff5a933fd4a /lib
parent6454f3b15bd1c260017c250915d45ba77ee86c4f (diff)
parent41ea54fd4e6cb54f5dffed3163468dd9bb5e347f (diff)
downloadotp-3694847de4ed6ee7bd5dba3bb20dce3964a6be46.tar.gz
otp-3694847de4ed6ee7bd5dba3bb20dce3964a6be46.tar.bz2
otp-3694847de4ed6ee7bd5dba3bb20dce3964a6be46.zip
Merge branch 'hasse/tools/xref_fix'
* hasse/tools/xref_fix: 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).