mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 12:29:58 +00:00
TUN-3107: UnregisterConnection shouldn't wrap nil error as RPC error
This commit is contained in:
@@ -37,9 +37,12 @@ func (re *RPCError) Error() string {
|
||||
}
|
||||
|
||||
func wrapRPCError(err error) *RPCError {
|
||||
return &RPCError{
|
||||
err: err,
|
||||
if err != nil {
|
||||
return &RPCError{
|
||||
err: err,
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newRPCError(format string, args ...interface{}) *RPCError {
|
||||
@@ -50,4 +53,4 @@ func newRPCError(format string, args ...interface{}) *RPCError {
|
||||
|
||||
func (re *RPCError) Unwrap() error {
|
||||
return re.err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user