summaryrefslogtreecommitdiffhomepage
path: root/pkg/eventchannel
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/eventchannel')
-rw-r--r--pkg/eventchannel/BUILD2
-rw-r--r--pkg/eventchannel/event.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/eventchannel/BUILD b/pkg/eventchannel/BUILD
index a264ae2f0..ad15d3672 100644
--- a/pkg/eventchannel/BUILD
+++ b/pkg/eventchannel/BUILD
@@ -12,13 +12,13 @@ go_library(
visibility = ["//:sandbox"],
deps = [
":eventchannel_go_proto",
+ "//pkg/errors/linuxerr",
"//pkg/log",
"//pkg/sync",
"//pkg/unet",
"@org_golang_google_protobuf//encoding/prototext:go_default_library",
"@org_golang_google_protobuf//proto:go_default_library",
"@org_golang_google_protobuf//types/known/anypb:go_default_library",
- "@org_golang_x_sys//unix:go_default_library",
"@org_golang_x_time//rate:go_default_library",
],
)
diff --git a/pkg/eventchannel/event.go b/pkg/eventchannel/event.go
index 98dfeb1f5..2be2d9d37 100644
--- a/pkg/eventchannel/event.go
+++ b/pkg/eventchannel/event.go
@@ -23,9 +23,9 @@ import (
"encoding/binary"
"fmt"
- "golang.org/x/sys/unix"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/proto"
+ "gvisor.dev/gvisor/pkg/errors/linuxerr"
pb "gvisor.dev/gvisor/pkg/eventchannel/eventchannel_go_proto"
"gvisor.dev/gvisor/pkg/log"
"gvisor.dev/gvisor/pkg/sync"
@@ -155,7 +155,7 @@ func (s *socketEmitter) Emit(msg proto.Message) (bool, error) {
for done := 0; done < len(p); {
n, err := s.socket.Write(p[done:])
if err != nil {
- return (err == unix.EPIPE), err
+ return linuxerr.Equals(linuxerr.EPIPE, err), err
}
done += n
}