Browse Source

handle PortalSuspended

Anton Lebedevich 13 years ago
parent
commit
d764524559
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/pgsql_sock.erl

+ 6 - 0
src/pgsql_sock.erl

@@ -432,6 +432,12 @@ on_message({$D, <<_Count:?int16, Bin/binary>>}, State) ->
     notify(State, {data, Data}),
     {noreply, State};
 
+%% PortalSuspended
+on_message({$s, <<>>}, State) ->
+    #state{queue = Q} = State,
+    notify(State, suspended),
+    {noreply, State#state{queue = queue:drop(Q)}};
+
 %% CommandComplete
 on_message({$C, Bin}, State) ->
     #state{queue = Q} = State,