We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15c042f commit c5803cfCopy full SHA for c5803cf
src/pgapp_worker.erl
@@ -120,7 +120,7 @@ handle_call({transaction, Fun}, _From,
120
handle_cast(reconnect, State) ->
121
{noreply, connect(State)}.
122
123
-handle_info({'EXIT', From, Reason}, State) ->
+handle_info({'EXIT', Conn, Reason}, #state{conn=Conn} = State) ->
124
{NewDelay, Tref} =
125
case State#state.timer of
126
undefined ->
@@ -137,9 +137,12 @@ handle_info({'EXIT', From, Reason}, State) ->
137
end,
138
139
error_logger:warning_msg(
140
- "~p EXIT from ~p: ~p - attempting to reconnect in ~p ms~n",
141
- [self(), From, Reason, NewDelay]),
142
- {noreply, State#state{conn = undefined, delay = NewDelay, timer = Tref}}.
+ "~p EXIT from epgsql_sock ~p: ~p - attempting to reconnect in ~p ms~n",
+ [self(), Conn, Reason, NewDelay]),
+ {noreply, State#state{conn = undefined, delay = NewDelay, timer = Tref}};
143
+
144
+handle_info(_Other, State) ->
145
+ {noreply, State}.
146
147
terminate(_Reason, #state{conn = undefined}) ->
148
ok;
0 commit comments