You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*bufio.Scanner and other consumers of io.Reader interface expect to receive io.EOF identically when reading to the end of a file/stream.
From the io package:
// EOF is the error returned by Read when no more input is available.
// (Read must return EOF itself, not an error wrapping EOF,
// because callers will test for EOF using ==.)
// Functions should return EOF only to signal a graceful end of input.
// If the EOF occurs unexpectedly in a structured data stream,
// the appropriate error is either [ErrUnexpectedEOF] or some other error
// giving more detail.
var EOF = errors.New("EOF")
We currently wrap EOF along with any other error when reading from netConn or msgReader. Instead, we should return io.EOF identically to conform with the io.Reader spec.
The text was updated successfully, but these errors were encountered:
Migrates us to `coder/websocket` v1.8.12 rather than `nhooyr/websocket` on an older version.
Works around coder/websocket#504 by adding an explicit test for `xerrors.Is(err, io.EOF)` where we were previously getting `io.EOF` from the netConn.
*bufio.Scanner and other consumers of
io.Reader
interface expect to receiveio.EOF
identically when reading to the end of a file/stream.From the io package:
We currently wrap
EOF
along with any other error when reading fromnetConn
ormsgReader
. Instead, we should returnio.EOF
identically to conform with theio.Reader
spec.The text was updated successfully, but these errors were encountered: