mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-15 07:54:08 +02:00
chore(pmtud): remove calls to syscall in favor of unix and windows
- syscall is deprecated and is not kept up-to-date - each OS is inherently different hence the syscall being deprecated
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/pmtud/constants"
|
||||
@@ -80,8 +79,7 @@ func (t *tracker) listen(ctx context.Context) error {
|
||||
n, _, err := recvFrom(t.fd, reply, 0)
|
||||
if err != nil {
|
||||
switch {
|
||||
case errors.Is(err, syscall.EAGAIN),
|
||||
errors.Is(err, syscall.EWOULDBLOCK):
|
||||
case errors.Is(err, constants.EAGAIN), errors.Is(err, constants.EWOULDBLOCK):
|
||||
pollSleep(ctx)
|
||||
continue
|
||||
case ctx.Err() != nil:
|
||||
|
||||
Reference in New Issue
Block a user