diff --git a/transport/handler_server.go b/transport/handler_server.go index 30e21ac0..f23b2daf 100644 --- a/transport/handler_server.go +++ b/transport/handler_server.go @@ -393,5 +393,5 @@ func mapRecvMsgError(err error) error { } } } - return ConnectionError{Desc: err.Error()} + return ConnectionErrorf(true, err, err.Error()) } diff --git a/transport/transport.go b/transport/transport.go index d59e5113..b31769ab 100644 --- a/transport/transport.go +++ b/transport/transport.go @@ -522,7 +522,7 @@ func (e ConnectionError) Origin() error { var ( // ErrConnClosing indicates that the transport is closing. - ErrConnClosing = ConnectionError{Desc: "transport is closing", temp: true} + ErrConnClosing = ConnectionErrorf(true, nil, "transport is closing") // ErrStreamDrain indicates that the stream is rejected by the server because // the server stops accepting new RPCs. ErrStreamDrain = StreamErrorf(codes.Unavailable, "the server stops accepting new RPCs")