Skip to content

avoid dumbpipe connect displaying "error: connection lost" #89

@joeyh

Description

@joeyh
echo foo | dumbpipe connect endpoint[REDACTED]
using secret key [REDACTED]
bar
error: connection lost

Dumbpipe is treating this as an error including exiting nonzero. But it has successfully relayed all stdin to the remote peer, and relayed back everything the peer replied with.

I think the reason this may be treated as an error is that the peer would accept additional input after the "foo". That's because I am using dumbpipe to connect to a peer that serves a line-based protocol, so would be willing to respond to additional commands. When it gets to EOF though, it does hang up.

The peer is running dumbpipe listen-unix --socket-path=. With the peer instead using dumbpipe listen, the dumbpipe connect doesn't error out like that. But in that case, it does wait for the peer to finish sending back everything on its stdin. Which is also not desirable when serving this kind of line-based protocol.

This affects git-annex when using git-annex-p2p-iroh, the "error: connection lost" message gets displayed here and there, although it does not cause any actual problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions