mirror of
https://github.com/openziti/ziti.git
synced 2026-11-07 02:30:16 +00:00
Ignore new static check error
This commit is contained in:
@@ -14,6 +14,7 @@ linters:
|
||||
- "-QF1001" # could apply De Morgan's law
|
||||
- "-ST1016" # methods on the same type should have the same receiver name
|
||||
- "-QF1002" # could use tagged switch on err
|
||||
- "-QF1012" # Use fmt.Fprintf(...) instead of WriteString(fmt.Sprintf(...)) (staticcheck)
|
||||
- "-SA1019" # x509.IsEncryptedPEMBlock has been deprecated since Go 1.16
|
||||
run:
|
||||
build-tags:
|
||||
|
||||
@@ -191,8 +191,8 @@ func (self *zcatAction) copy(writer io.Writer, reader io.Reader, desc string) {
|
||||
} else {
|
||||
pfxlog.Logger().WithField("desc", desc).Info("connection closed")
|
||||
}
|
||||
if zconn, ok := writer.(edge.Conn); ok {
|
||||
if err = zconn.CloseWrite(); err != nil {
|
||||
if cw, ok := writer.(edge.CloseWriter); ok {
|
||||
if err = cw.CloseWrite(); err != nil {
|
||||
pfxlog.Logger().WithError(err).Error("error closing write side of ziti connection")
|
||||
}
|
||||
}
|
||||
@@ -233,3 +233,10 @@ func (c *connProxy) SetReadDeadline(t time.Time) error {
|
||||
func (c *connProxy) SetWriteDeadline(t time.Time) error {
|
||||
return c.conn.Load().SetWriteDeadline(t)
|
||||
}
|
||||
|
||||
func (c *connProxy) CloseWrite() error {
|
||||
if cw, ok := c.conn.Load().(edge.Conn); ok {
|
||||
return cw.CloseWrite()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user