Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More graceful errors when cancelled #53

Open
Jacalz opened this issue May 20, 2021 · 3 comments
Open

More graceful errors when cancelled #53

Jacalz opened this issue May 20, 2021 · 3 comments

Comments

@Jacalz
Copy link
Contributor

Jacalz commented May 20, 2021

As of 049df45, cancelling incomming and outgoing connections works great. However, it would be nice if the errors could be a bit more graceful. This does not affect the latest stable release yet.

Cancelling the outgoing send returns this (first error being in the sending end and the second in the receiving end):

2021/05/20 21:01:28 Fyne error:  Error on sending file
2021/05/20 21:01:28   Cause: write tcp 192.168.1.220:43901->192.168.1.220:36580: use of closed network connection
2021/05/20 21:01:28   At: /home/jacob/go/src/github.com/Jacalz/wormhole-gui/internal/transport/bridge/send.go:112
2021/05/20 21:01:28 Fyne error:  Error on copying contents to file
2021/05/20 21:01:28   Cause: unexpected EOF
2021/05/20 21:01:28   At: /home/jacob/go/src/github.com/Jacalz/wormhole-gui/internal/transport/receiver.go:71

Cancelling the incoming receive returns this. Here, the first error (from the receiving end) is what I would like to see, but the second error is not quite as graceful.

2021/05/20 21:02:02 Fyne error:  Error on copying contents to file
2021/05/20 21:02:02   Cause: context canceled
2021/05/20 21:02:02   At: /home/jacob/go/src/github.com/Jacalz/wormhole-gui/internal/transport/receiver.go:71
2021/05/20 21:02:02 Fyne error:  Error on sending file
2021/05/20 21:02:02   Cause: write tcp 192.168.1.220:43167->192.168.1.220:55670: write: connection reset by peer
2021/05/20 21:02:02   At: /home/jacob/go/src/github.com/Jacalz/wormhole-gui/internal/transport/bridge/send.go:112

I would like it if all the errors could fail gracefully with "context cancelled".

@Jacalz

This comment has been minimized.

@bryanchriswhite
Copy link

It would also be great if the "context canceled" error could be exposed somewhere (I could not find where it is created). This would allow me to check if it was cancelled and then avoid showing a bunch of error messages to the users in wormhole-gui.

Is context.Canceled not what you're looking for?

@Jacalz

This comment has been minimized.

Jacalz added a commit to Jacalz/rymdport that referenced this issue Jun 2, 2021
Needs psanford/wormhole-william#53 fixed to work propertly in all cases.
Jacalz added a commit to Jacalz/rymdport that referenced this issue Aug 4, 2021
Needs psanford/wormhole-william#53 fixed to work propertly in all cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants