Why check for net.Error?
- Dominant language
- Go
- Stars
- 4.2k
- Forks
- 509
- PR merge metrics
- No merged PRs in 30d
Description
Love the library - it's brilliant. One question:
In `(*serverConn).Read` and `(*serverConn).Write`, there is the following line that only cancels the context if the error is a `net.Error`:
https://github.com/gliderlabs/ssh/blob/59d6e4540dea33ecd8f90b12887906b7b081fbcd/conn.go#L20
Why does it check for this type and not cancel the context for other types of errors? I am using `github.com/hashicorp/yamux` to provide the underlying `net.Conn` and it returns `io.EOF` when the stream is closed - which isn't a `net.Error`, so the context doesn't get cancelled and the connection just hangs around.
Am I perhaps misunderstanding some details? Or is this a bug?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.