mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-04 15:36:57 +01:00
* src/odbc/ejabberd_odbc.erl: close MySQL connections on terminate (needs mysql r829)
SVN Revision: 1700
This commit is contained in:
parent
bc9ba75c2b
commit
9e679aa621
@ -223,7 +223,15 @@ handle_info(_Info, State) ->
|
||||
%% Purpose: Shutdown the server
|
||||
%% Returns: any (ignored by gen_server)
|
||||
%%----------------------------------------------------------------------
|
||||
terminate(_Reason, _State) ->
|
||||
terminate(_Reason, State) ->
|
||||
case State#state.db_type of
|
||||
mysql ->
|
||||
% old versions of mysql driver don't have the stop function
|
||||
% so the catch
|
||||
catch mysql_conn:stop(State#state.db_ref);
|
||||
_ ->
|
||||
ok
|
||||
end,
|
||||
ok.
|
||||
|
||||
%%%----------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user