apisix
apisix copied to clipboard
fix: stream route matcher is nil after first match
Description
Fix https://github.com/apache/apisix/issues/11259
this bug introduced in https://github.com/apache/apisix/pull/10298/files#diff-0234dd467ed66c3dffbef844397e9e7e018c287aab324ba8dd0b5a9e03b89360, I have no idea why made those changes,
set route.value.xxx_matcher to nil is insane, the stream route only working in first matched request now, after first match, all requests to same stream route will be panic with nil matcher:
Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] I have explained the changes or the new features added to this PR
- [x] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [x] I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)