Skip to content

s2n_recv: upon connection close, *more needs to be set to zero. #165

Closed
@samrushing

Description

@samrushing

If *more is left set to 1, there's no indication to the caller that the connection has closed.
Additionally, the wipe of the connection structure sets read/writefd to zero, so the end result is another call to s2n_recv() that is reading from stdin.

The 3 lines of changes are in my fork, let me know if you want me to do a pull request.

There may be additional such issues with *more, e.g. s2n_flush().

Note: this problem showed up while testing a server in non-blocking mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions