Commit 7b719ea
@tus/server: handle request cancellation gracefully (#774)
This PR fixes 2 regressions:
- Handle gracefully the request cancellation by aborting the context,
which will allow the locks to be released immediately and available to
be acquired by subsequent requests. Currently, this has been broken
since the context was never cancelled when the request was aborted
- Force closing the connection when the request was aborted, to prevent
the client from needing to send the whole body before realising that the
upload was cancelled (potentially from another request acquiring the
lock)
---------
Co-authored-by: Merlijn Vos <[email protected]>1 parent 75fc616 commit 7b719ea
File tree
2 files changed
+27
-2
lines changed- .changeset
- packages/server/src
2 files changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
137 | 148 | | |
138 | 149 | | |
139 | 150 | | |
| |||
212 | 223 | | |
213 | 224 | | |
214 | 225 | | |
215 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
216 | 236 | | |
217 | 237 | | |
218 | 238 | | |
| |||
253 | 273 | | |
254 | 274 | | |
255 | 275 | | |
256 | | - | |
| 276 | + | |
257 | 277 | | |
258 | 278 | | |
259 | 279 | | |
| |||
0 commit comments