I ran into a crash today where the pgsql_connection is in the parsing state, and from the sasl logs I see that reply={error, timeout} in the state record. It crashes because it receives the message {$2, <<>>} and that is not a valid message while in the parsing state.
I found it interesting that when parsing times out it continues on in the parsing state:
parsing(timeout, State) ->
#state{timeout = Timeout} = State,
Reply = {error, timeout},
send(State, $S, []),
{next_state, parsing, State#state{reply = Reply}, Timeout};
Why does it not go to the timeout state like querying?
querying(timeout, State) ->
#state{sock = Sock, timeout = Timeout, backend = {Pid, Key}} = State,
pgsql_sock:cancel(Sock, Pid, Key),
{next_state, timeout, State, Timeout};
I ran into a crash today where the pgsql_connection is in the parsing state, and from the sasl logs I see that reply={error, timeout} in the state record. It crashes because it receives the message {$2, <<>>} and that is not a valid message while in the parsing state.
I found it interesting that when parsing times out it continues on in the parsing state:
Why does it not go to the timeout state like querying?