summaryrefslogtreecommitdiff
path: root/plugins/http
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-03-28 14:00:54 +0300
committerValery Piashchynski <[email protected]>2021-03-28 14:00:54 +0300
commit2a58b1be2c79f2fe10c0a429878937661645a928 (patch)
treef3a7cd472c75c4dd2a97bcf97cb154731ed81230 /plugins/http
parent970014530a23d57a3be41c6369ac6456d0b36ae1 (diff)
- Fix bug with the worker reallocating during the response
- Update .golangci and fix new warnings Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/http')
-rw-r--r--plugins/http/errors.go2
-rw-r--r--plugins/http/handler.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/http/errors.go b/plugins/http/errors.go
index fb8762ef..5889aa76 100644
--- a/plugins/http/errors.go
+++ b/plugins/http/errors.go
@@ -16,7 +16,7 @@ var errEPIPE = errors.New("EPIPE(32) -> connection reset by peer")
func handleWriteError(err error) error {
if netErr, ok2 := err.(*net.OpError); ok2 {
if syscallErr, ok3 := netErr.Err.(*os.SyscallError); ok3 {
- if syscallErr.Err == syscall.EPIPE {
+ if errors.Is(syscallErr.Err, syscall.EPIPE) {
return errEPIPE
}
}
diff --git a/plugins/http/handler.go b/plugins/http/handler.go
index b7c6f1fa..d3c928aa 100644
--- a/plugins/http/handler.go
+++ b/plugins/http/handler.go
@@ -176,7 +176,7 @@ func (h *Handler) sendEvent(event interface{}) {
// get real ip passing multiple proxy
func (h *Handler) resolveIP(r *Request) {
- if h.trusted.IsTrusted(r.RemoteAddr) == false {
+ if h.trusted.IsTrusted(r.RemoteAddr) == false { //nolint:gosimple
return
}