From c0a8922c2e2dee7ff81c29ed0995ed07a3c206ae Mon Sep 17 00:00:00 2001 From: roboogg133 Date: Tue, 2 Sep 2025 13:14:35 -0300 Subject: [PATCH] Setting a const variable to default deadline for lan deadline --- cmd/packets/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/packets/main.go b/cmd/packets/main.go index 517d27c..dc6e3fc 100644 --- a/cmd/packets/main.go +++ b/cmd/packets/main.go @@ -99,6 +99,8 @@ type Manifest struct { } `toml:"Hooks"` } +const LANDeadLine = 2 + // errors var ErrNotInstalled = errors.New("this package isn't installed") @@ -1106,7 +1108,7 @@ func AskLAN(filename string) []Peer { } } } - _ = pc.SetDeadline(time.Now().Add(2 * time.Second)) + _ = pc.SetDeadline(time.Now().Add(LANDeadLine * time.Second)) buf := make([]byte, 1500) for {