Forget prepared SQL queries on database connect (#1325)

This commit is contained in:
Alexey Shchepin 2017-04-03 16:30:02 +03:00
parent b75780b9cd
commit f45dc46856
1 changed files with 6 additions and 0 deletions

View File

@ -301,6 +301,12 @@ connecting(connect, #state{host = Host} = State) ->
case ConnectRes of
{ok, Ref} ->
erlang:monitor(process, Ref),
lists:foreach(
fun({{?PREPARE_KEY, _} = Key, _}) ->
erase(Key);
(_) ->
ok
end, get()),
PendingRequests =
p1_queue:dropwhile(
fun(Req) ->