more explicit asyncPackets switch

This commit is contained in:
adman
2026-04-04 19:32:46 +02:00
parent fbc3693219
commit ca74a3c3d4
2 changed files with 17 additions and 3 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ func (l *Loop) RegisterCustomType(eventType reflect.Type, hv reflect.Value) {
v := hv.Call([]reflect.Value{reflect.ValueOf(packet)})[0]
if !v.IsNil() {
err := v.Interface().(error)
if errors.Is(err, HandlerDoneErr{}) || errors.Is(err, DontForwardErr) {
if errors.As(err, &HandlerDoneErr{}) || errors.Is(err, DontForwardErr) {
return err
}
slog.Error("handler failed", "err", err)