Skip to content

When is flush needed? #32

@petrzjunior

Description

@petrzjunior

I am trying to use this library in my project and found an interesting sequence of events:

Server init -> client init -> handshake started -> client write -> client read -> handshake finished

In this sequence, client write is buffered until the handshake is finished. But then, it is not actually sent and so a response never comes back. I managed to fix this by either waiting on handshake .handshake().await or by flushing the client after write before read .flush().await.

Since this crate has only little documentation, I wanted to clarify if this is a bug or a feature. Should I call flush whenever I expect a response to come back?

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