Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid "Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true." error #8

Merged
merged 4 commits into from
Feb 24, 2020

Conversation

MaxDeg
Copy link
Contributor

@MaxDeg MaxDeg commented Jan 20, 2020

With aspnet core 3.X calling sync Write method on Response body throw an exception.

Flushing JsonTextWriter asynchronously avoid Dispose method to doing it sync.
Resulting in the following error: "System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true."

… an exception.

Flushing JsonTextWriter asynchronously avoid Dispose method to doing it sync.
Resulting in the following error: "System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true."
@MangelMaxime
Copy link
Contributor

When running the tests via dotnet run, the process hang for ever and never exit.

This is a problem because, then I can automate the tests do you have this problem?

@MaxDeg
Copy link
Contributor Author

MaxDeg commented Feb 12, 2020

Not that I know. I will check that tomorrow. Are you running them on Windows or Linux?

@MangelMaxime
Copy link
Contributor

I was running on windows

@MaxDeg
Copy link
Contributor Author

MaxDeg commented Feb 13, 2020

I added dependencies to support dotnet test and dispose the host in tests to avoid hanging of expecto process.

@MangelMaxime MangelMaxime merged commit ee35cb6 into thoth-org:master Feb 24, 2020
@MangelMaxime
Copy link
Contributor

Thank you @MaxDeg and sorry for taking so long for merging and releasing the PR

@MangelMaxime MangelMaxime mentioned this pull request Feb 24, 2020
@MaxDeg
Copy link
Contributor Author

MaxDeg commented Feb 24, 2020

You're welcome 😊 Glad to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants