mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Remove dependency on golang.org/x/sys/unix
(*os.PathError).Timeout does the same thing. PiperOrigin-RevId: 360756784
This commit is contained in:
committed by
gVisor bot
parent
9c80bcf32d
commit
cfd2c31962
@@ -18,7 +18,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/linewriter",
|
||||
"//pkg/sync",
|
||||
"@org_golang_x_sys//unix:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
+1
-2
@@ -40,7 +40,6 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
"gvisor.dev/gvisor/pkg/linewriter"
|
||||
"gvisor.dev/gvisor/pkg/sync"
|
||||
)
|
||||
@@ -105,7 +104,7 @@ func (l *Writer) Write(data []byte) (int, error) {
|
||||
n += w
|
||||
|
||||
// Is it a non-blocking socket?
|
||||
if pathErr, ok := err.(*os.PathError); ok && pathErr.Err == unix.EAGAIN {
|
||||
if pathErr, ok := err.(*os.PathError); ok && pathErr.Timeout() {
|
||||
runtime.Gosched()
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user