Commit 0b04722
authored
Close HTTP response on unhandled request timeout (#2007)
* Close HTTP response on unhandled request timeout
This commit updates the defaultUnhandledRequestHandler to close the HTTP
response when an incoming event is not acknowledged within the expected
timeframe. This change ensures that resources are not left hanging and
that the server correctly indicates to the client that the event was not
processed as expected.
By sending a 503 Service Unavailable status code and ending the response,
we provide clearer semantics and prevent potential resource leaks on the
server.
* Update error code as per code review feedback1 parent 5587d01 commit 0b04722
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
227 | 234 | | |
228 | 235 | | |
229 | 236 | | |
| |||
0 commit comments