aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/odbc/ejabberd_odbc.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/odbc/ejabberd_odbc.erl b/src/odbc/ejabberd_odbc.erl
index 4f0f0ded1..3a028359e 100644
--- a/src/odbc/ejabberd_odbc.erl
+++ b/src/odbc/ejabberd_odbc.erl
@@ -266,6 +266,7 @@ odbc_connect(SQLServer) ->
pgsql_connect(Server, Port, DB, Username, Password) ->
case pgsql:connect(Server, DB, Username, Password, Port) of
{ok, Ref} ->
+ erlang:monitor(process, Ref),
{ok, #state{db_ref = Ref, db_type = pgsql}};
{error, Reason} ->
?ERROR_MSG("PostgreSQL connection failed: ~p~n", [Reason]),