api/plugins/tls_interceptor/proxy_conn.go
Peter Kurfer ca1ac7d89a
Move plugins to top level directory in repository
- update Makefiles and GoReleaser config
- update dependencies
2020-04-11 15:31:08 +02:00

22 lines
412 B
Go

package main
import (
"fmt"
"net"
)
type proxyConn struct {
source net.Conn
target net.Conn
}
func (p *proxyConn) Close() error {
var err error
if targetErr := p.target.Close(); targetErr != nil {
err = fmt.Errorf("error while closing target conn: %w", targetErr)
}
if sourceErr := p.source.Close(); sourceErr != nil {
err = fmt.Errorf("error while closing source conn: %w", err)
}
return err
}