From 5c39f7ab2cf74fd96a97b7233aaa913e9a5cc717 Mon Sep 17 00:00:00 2001 From: roboogg133 Date: Wed, 3 Sep 2025 22:43:25 -0300 Subject: [PATCH] making LANDeadline const, more readable --- cmd/packets/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/packets/main.go b/cmd/packets/main.go index eb5d4c4..a960e95 100644 --- a/cmd/packets/main.go +++ b/cmd/packets/main.go @@ -99,7 +99,7 @@ type Manifest struct { } `toml:"Hooks"` } -const LANDeadLine = 2 +const LANDeadLine = 2 * time.Second // errors @@ -1111,7 +1111,7 @@ func AskLAN(filename string) []Peer { } } } - _ = pc.SetDeadline(time.Now().Add(LANDeadLine * time.Second)) + _ = pc.SetDeadline(time.Now().Add(LANDeadLine)) buf := make([]byte, 1500) for {