making LANDeadline const, more readable

This commit is contained in:
2025-09-03 22:43:25 -03:00
parent b676ea873e
commit 5c39f7ab2c

View File

@@ -99,7 +99,7 @@ type Manifest struct {
} `toml:"Hooks"` } `toml:"Hooks"`
} }
const LANDeadLine = 2 const LANDeadLine = 2 * time.Second
// errors // 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) buf := make([]byte, 1500)
for { for {