mirror of
https://github.com/soypat/lneto.git
synced 2026-08-21 15:09:05 +00:00
begin working on making response quicker (why is tap interface so slow?)
This commit is contained in:
@@ -7,6 +7,7 @@ type BackoffFlags uint8
|
||||
const (
|
||||
BackoffHasPriority BackoffFlags = 1 << iota
|
||||
BackoffCriticalPath
|
||||
BackoffTCPConn
|
||||
)
|
||||
|
||||
func NewBackoff(priority BackoffFlags) Backoff {
|
||||
@@ -14,6 +15,10 @@ func NewBackoff(priority BackoffFlags) Backoff {
|
||||
return Backoff{
|
||||
maxWait: uint32(1 * time.Millisecond),
|
||||
}
|
||||
} else if priority&BackoffTCPConn != 0 {
|
||||
return Backoff{
|
||||
maxWait: uint32(5 * time.Microsecond),
|
||||
}
|
||||
}
|
||||
return Backoff{
|
||||
maxWait: uint32(time.Second) >> (priority & BackoffHasPriority),
|
||||
|
||||
Reference in New Issue
Block a user