pass a string, not an error, to Session.CloseWithError

This commit is contained in:
Marten Seemann
2019-05-12 13:45:40 +09:00
parent 6cdc228ef6
commit 0a86224858
7 changed files with 12 additions and 11 deletions

View File

@@ -155,8 +155,8 @@ type Session interface {
// Close the connection.
io.Closer
// Close the connection with an error.
// The error must not be nil.
CloseWithError(ErrorCode, error) error
// The error string will be sent to the peer.
CloseWithError(ErrorCode, string) error
// The context is cancelled when the session is closed.
// Warning: This API should not be considered stable and might change soon.
Context() context.Context