Fix flow close reasons

This commit is contained in:
世界 2026-07-08 18:44:57 +08:00
parent 2de01a4c29
commit dcfbe83ca6
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
3 changed files with 29 additions and 24 deletions

13
flow.go
View file

@ -41,27 +41,16 @@ const (
FlowCloseReset FlowCloseReason = iota
FlowCloseFinished
FlowCloseTimeout
FlowCloseEvicted
FlowCloseShutdown
FlowCloseInterrupted
)
func (r FlowCloseReason) String() string {
switch r {
case FlowCloseReset:
return "connection reset"
case FlowCloseFinished:
return "finished"
case FlowCloseTimeout:
return "idle timeout"
case FlowCloseEvicted:
return "evicted"
case FlowCloseShutdown:
return "stack closed"
case FlowCloseInterrupted:
return "interrupted"
default:
return "unknown"
return "connection reset"
}
}