Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ const setupRoutes = function setupRoutes() {
};

socket.progress = (data) => {
if (socket.readyState !== 1) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with the change. But it begs the question: should we wrap socket.send and inject that same logical check so all attempts to socket.send are covered?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds reasonable, it should prevent any other such problems. I'll look into it.

return;
}
socket.send(prep({ action: 'progress', data }));
};

Expand Down