aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mysqlerl_connection.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mysqlerl_connection.erl b/src/mysqlerl_connection.erl
index 1a3d900..aa49c7e 100644
--- a/src/mysqlerl_connection.erl
+++ b/src/mysqlerl_connection.erl
@@ -18,7 +18,10 @@ start_link(Owner, Host, Port, Database, User, Password, Options) ->
User, Password, Options], []).
stop(Pid) ->
- gen_server:call(Pid, stop).
+ case (catch gen_server:call(Pid, stop)) of
+ {'EXIT', _} -> ok;
+ Other -> Other
+ end.
init([Owner, Host, Port, Database, User, Password, Options]) ->
process_flag(trap_exit, true),