Browse Source

save transaction status (unused now)

Anton Lebedevich 13 years ago
parent
commit
ce1951b55a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/pgsql_sock.erl

+ 2 - 2
src/pgsql_sock.erl

@@ -487,7 +487,7 @@ on_message({$I, _Bin}, State) ->
     {noreply, State2};
     {noreply, State2};
 
 
 %% ReadyForQuery
 %% ReadyForQuery
-on_message({$Z, <<_Status:8>>}, State) ->
+on_message({$Z, <<Status:8>>}, State) ->
     State2 = case command_tag(State) of
     State2 = case command_tag(State) of
                  squery ->
                  squery ->
                      case State#state.results of
                      case State#state.results of
@@ -502,7 +502,7 @@ on_message({$Z, <<_Status:8>>}, State) ->
                  sync ->
                  sync ->
                      reply(State, ok)
                      reply(State, ok)
              end,
              end,
-    {noreply, State2};
+    {noreply, State2#state{txstatus = Status}};
 
 
 on_message(Error = {error, _}, State) ->
 on_message(Error = {error, _}, State) ->
     State2 = case command_tag(State) of
     State2 = case command_tag(State) of