Skip to content

Commit

Permalink
catch exception if cache process is dead when trying to stop it
Browse files Browse the repository at this point in the history
  • Loading branch information
fdmanana committed Oct 7, 2010
1 parent 3d8ad2b commit ffa92be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion term_cache.erl
Expand Up @@ -78,7 +78,8 @@ start_link(Options) ->

%% @spec stop(cache()) -> ok
stop(Cache) ->
ok = gen_server:call(Cache, stop).
catch gen_server:call(Cache, stop),
ok.


init(Options) ->
Expand Down
3 changes: 2 additions & 1 deletion term_cache_trees.erl
Expand Up @@ -77,7 +77,8 @@ start_link(Options) ->

%% @spec stop(cache()) -> ok
stop(Cache) ->
ok = gen_server:call(Cache, stop).
catch gen_server:call(Cache, stop),
ok.


init(Options) ->
Expand Down

0 comments on commit ffa92be

Please sign in to comment.