Skip to content

Typo in handshake.go error handler #172

@quackenbush

Description

@quackenbush

https://github.com/nhooyr/websocket/blob/master/handshake.go#L332

On line 332:

rwc will always be nil if the cast fails, so %T will print <nil> instead of a proper type.

Current:
return nil, resp, fmt.Errorf("response body is not a io.ReadWriteCloser: %T", rwc)

Corrected:

return nil, resp, fmt.Errorf("response body is not a io.ReadWriteCloser: %T", resp.Body)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions