Commit ff85849
committed
Expect body chunks when aborting during status handling, close AsyncHttpClient#1430
Motivation:
When aborting during response status handling, we currently directly
offer the channel to the pool. This is wrong as we’ll at least receive
the LastHttpContent. Currently, this event is received by the next
request being executed with this channel, causing a null response.
Modification:
Always expect chunks when aborting during status or headers handling,
causing channel to be drained before being offered to the pool.
Note that AHC 2.1 doesn’t suffer from this issue as aborting now always
close the channel.
Result:
No more null response when aborting on status or headers handling1 parent 70a2bb4 commit ff85849
File tree
1 file changed
+3
-2
lines changed- client/src/main/java/org/asynchttpclient/netty/handler
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
0 commit comments