mirror of
https://github.com/Gouryella/drip.git
synced 2026-02-26 14:21:17 +00:00
fix(tunnel): Fixes the delayed display logic to correctly handle microsecond-level delays.
- Adjust the delayed formatting function to prioritize checking if the delay is 0 to avoid displaying errors. - When the delay is less than 1 millisecond, it is displayed in microseconds to improve the precision of the expression. feat (constants): Shorten heart rate intervals and timeouts to improve response speed. - Adjust HeartbeatInterval from 5 seconds to 2 seconds - Adjust HeartbeatTimeout from 15 seconds to 6 seconds - Improve the sensitivity of heartbeat detection between the client and the server
This commit is contained in:
@@ -10,10 +10,10 @@ const (
|
||||
DefaultWSPort = 8080
|
||||
|
||||
// HeartbeatInterval is how often clients send heartbeat messages
|
||||
HeartbeatInterval = 5 * time.Second
|
||||
HeartbeatInterval = 2 * time.Second
|
||||
|
||||
// HeartbeatTimeout is how long the server waits before considering a connection dead
|
||||
HeartbeatTimeout = 15 * time.Second
|
||||
HeartbeatTimeout = 6 * time.Second
|
||||
|
||||
// RequestTimeout is the maximum time to wait for a response from the client
|
||||
RequestTimeout = 30 * time.Second
|
||||
|
||||
Reference in New Issue
Block a user