- make stream fast path honor adaptive soft payload limits end-to-end - split oversized fast-stream payloads into sequential frames before batching - use adaptive soft cap when encoding stream batch payloads - move timeout-like error detection into production code for adaptive tx - tune notify FrameReader read size explicitly to avoid throughput regression - drop local stario replace and depend on released b612.me/stario v0.1.1
23 lines
358 B
Go
23 lines
358 B
Go
package notify
|
|
|
|
import (
|
|
"errors"
|
|
"net"
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func isTimeoutLikeError(err error) bool {
|
|
if err == nil {
|
|
return false
|
|
}
|
|
if errors.Is(err, os.ErrDeadlineExceeded) {
|
|
return true
|
|
}
|
|
var netErr net.Error
|
|
if errors.As(err, &netErr) && netErr.Timeout() {
|
|
return true
|
|
}
|
|
return strings.Contains(strings.ToLower(err.Error()), "timeout")
|
|
}
|