Skip to content

Nitpick: Calling send_data on socket in draining state should result in {error,closed} #120

Description

@essen

In v1.3.0 it returns in {error, {invalid_state, draining}}. I think it should return {error, closed} because we can try to send data under normal conditions before we could process the message telling us about the socket close. The same is probably true of most functions called during the draining state.

=SUPERVISOR REPORT==== 27-Apr-2026::12:22:22.259969 ===
    supervisor: {<0.335.0>,corral_conns_sup}
    errorContext: child_terminated
    reason: {{case_clause,{error,{invalid_state,draining}}},
             [{corral_echo_protocol,handle,2,
                                    [{file,"test/corral_echo_protocol.erl"},
                                     {line,125}]},
              {proc_lib,init_p_do_apply,3,
                        [{file,"proc_lib.erl"},{line,333}]}]}
    offender: [{pid,<0.342.0>},
               {id,corral_echo_protocol},
               {mfargs,
                   {corral_echo_protocol,start_link,
                       [do_stop_sending_server_test,corral_quic,<0.341.0>,
                        opts]}},
               {restart_type,permanent},
               {significant,false},
               {shutdown,5000},
               {child_type,worker}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions