Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

rest/media: Don't call finish in case of error#4939

Closed
jo-so wants to merge 1 commit intomatrix-org:developfrom
jo-so:fix-4933
Closed

rest/media: Don't call finish in case of error#4939
jo-so wants to merge 1 commit intomatrix-org:developfrom
jo-so:fix-4933

Conversation

@jo-so
Copy link

@jo-so jo-so commented Mar 26, 2019

When an exception occurs during the sending of data, the request doesn't
needs a finishing, otherwise twisted complains Producer was not unregistered for b'/_matrix/media/v1/thumbnail/…'.

Fixes #4933

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file
  • Pull request includes a sign off

Signed-off-by: Jörg Sommer <joerg@jo-so.de>

When an exception occurs during the sending of data, the request doesn't
needs a finishing, otherwise twisted complains `Producer was not
unregistered for b'/_matrix/media/v1/thumbnail/…'`.

Fixes matrix-org#4933
@erikjohnston
Copy link
Member

I think you're probably right, but I do wonder what will happen in the case where the synapse code errors rather than the connection, as I feel like we should probably close the connection or something in that case? @hawkowl do you have any idea?

@richvdh
Copy link
Member

richvdh commented Apr 24, 2019

hopefully #5009 makes this redundant.

@richvdh richvdh closed this Apr 24, 2019
@jo-so
Copy link
Author

jo-so commented Apr 28, 2019

#5009 doesn't contain the exclusion of the useless message »Consumer asked us to stop producing« or is this solved otherwise?

-        logger.warning("Failed to write to consumer: %s %s", type(e), e)
+        if str(e) != "Consumer asked us to stop producing":
+            logger.warning("Failed to write to consumer: %s %s", type(e), e)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants