Merge pull request #868 from menghanl/connection_errorf
Use ConnectionErrorf
This commit is contained in:
@ -393,5 +393,5 @@ func mapRecvMsgError(err error) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ConnectionError{Desc: err.Error()}
|
return ConnectionErrorf(true, err, err.Error())
|
||||||
}
|
}
|
||||||
|
@ -522,7 +522,7 @@ func (e ConnectionError) Origin() error {
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// ErrConnClosing indicates that the transport is closing.
|
// 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
|
// ErrStreamDrain indicates that the stream is rejected by the server because
|
||||||
// the server stops accepting new RPCs.
|
// the server stops accepting new RPCs.
|
||||||
ErrStreamDrain = StreamErrorf(codes.Unavailable, "the server stops accepting new RPCs")
|
ErrStreamDrain = StreamErrorf(codes.Unavailable, "the server stops accepting new RPCs")
|
||||||
|
Reference in New Issue
Block a user