Skip to content

Returning the buffer on a failed read results in errors #23

@barr-israel

Description

@barr-israel

I have written a simple server based on this echo server and observed the following behavior:
when the connection is closed, the read operation gets 0 bytes read and the buffer id 0, and then "returns" it to the available buffers using a "provide" call.
In reality no buffer was given to that read and it is returning buffer 0 without ever getting it, which results in any operation that uses buffer 0 to have unexpected results due to multiple operations sharing the buffer.
Removing line 153 fixed this.
Might be important: my version uses UNIX sockets and not the INET ones used here.

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