Fixed connection error handling by removing duplicated errors, standardizing on non-pointer error types

This commit is contained in:
Igor Postelnik
2021-01-20 11:52:35 -06:00
parent ce22dd681a
commit db0562c7b8
6 changed files with 34 additions and 72 deletions

View File

@@ -209,9 +209,9 @@ func (h *h2muxConnection) processRegisterTunnelError(err tunnelpogs.TunnelRegist
return errDuplicationConnection
}
h.observer.metrics.regFail.WithLabelValues("server_error", string(name)).Inc()
return serverRegisterTunnelError{
cause: err,
permanent: err.IsPermanent(),
return ServerRegisterTunnelError{
Cause: err,
Permanent: err.IsPermanent(),
}
}