mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-25 14:24:55 +02:00
Close pgsql ports on ejabberd_sql process termination (#2541)
This commit is contained in:
parent
2946df357c
commit
404ae56e07
@ -450,6 +450,7 @@ handle_info(Info, StateName, State) ->
|
|||||||
|
|
||||||
terminate(_Reason, _StateName, State) ->
|
terminate(_Reason, _StateName, State) ->
|
||||||
case State#state.db_type of
|
case State#state.db_type of
|
||||||
|
pgsql -> catch pgsql:terminate(State#state.db_ref);
|
||||||
mysql -> catch p1_mysql_conn:stop(State#state.db_ref);
|
mysql -> catch p1_mysql_conn:stop(State#state.db_ref);
|
||||||
sqlite -> catch sqlite3:close(sqlite_db(State#state.host));
|
sqlite -> catch sqlite3:close(sqlite_db(State#state.host));
|
||||||
_ -> ok
|
_ -> ok
|
||||||
|
Loading…
Reference in New Issue
Block a user