Skip to content

Commit

Permalink
don't close socket when pausing
Browse files Browse the repository at this point in the history
because it prevented us from canceling an upload that is paused
note that we here sacrifice the ability to pause uploads and have other uploads take over the paused upload's rate limit queue spot.
this is sacrificed because we will soon remove the ability to pause/resume uploads anyways

(cherry picked from commit e4dbe77)
  • Loading branch information
mifi authored and aduh95 committed Jul 2, 2024
1 parent dd11264 commit ef5a1c4
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/@uppy/companion-client/src/RequestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,15 +540,6 @@ export default class RequestClient<M extends Meta, B extends Body> {

isPaused = newPausedState
if (socket) sendState()

if (newPausedState) {
// Remove this file from the queue so another file can start in its place.
socketAbortController?.abort?.() // close socket to free up the request for other uploads
} else {
// Resuming an upload should be queued, else you could pause and then
// resume a queued upload to make it skip the queue.
createWebsocket()
}
}

const onFileRemove = (targetFile: UppyFile<M, B>) => {
Expand Down

0 comments on commit ef5a1c4

Please sign in to comment.