Skip to content

Commit

Permalink
remove deadline when fallback route is chosen (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeidiDeng authored Jan 2, 2025
1 parent 3c6cc2c commit 6e5f5e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions layer4/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ func (routes RouteList) Compile(logger *zap.Logger, matchingTimeout time.Duratio
matcherNeedMore = true
goto loop
}
// fallback route, removing deadline
// see: https://github.com/mholt/caddy-l4/issues/274
err = cx.Conn.SetReadDeadline(time.Time{})
if err != nil {
return err
}
return next.Handle(cx)
}
})
Expand Down

0 comments on commit 6e5f5e3

Please sign in to comment.