Browse Source

handle too short messages

Anton Lebedevich 13 years ago
parent
commit
8e78752f67
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/pgsql_wire.erl

+ 3 - 0
src/pgsql_wire.erl

@@ -31,3 +31,6 @@ decode_messages(Acc, <<Type:8, Len:?int32, Rest/binary>> = Bin, State) ->
         _Other ->
         _Other ->
             {lists:reverse(Acc), State#state{tail = Bin}}
             {lists:reverse(Acc), State#state{tail = Bin}}
     end;
     end;
+
+decode_messages(Acc, Bin, State) ->
+    {lists:reverse(Acc), State#state{tail = Bin}}.