Skip to content

fix: Catch System.ObjectDisposedException when the request is already disposed#224

Open
cswpy wants to merge 1 commit intostardew-valley-dedicated-server:masterfrom
cswpy:master
Open

fix: Catch System.ObjectDisposedException when the request is already disposed#224
cswpy wants to merge 1 commit intostardew-valley-dedicated-server:masterfrom
cswpy:master

Conversation

@cswpy
Copy link
Copy Markdown

@cswpy cswpy commented Mar 4, 2026

🔗 Linked issue

Resolves #223 .

📚 Description

Do not attempt to access an already disposed Response object when a WebSocket request comes in and it fails during the process. After the change, this exception will be caught and not result in a warning any more.

@cswpy cswpy requested a review from JulianVallee as a code owner March 4, 2026 04:32
@cswpy cswpy changed the title Fix System.ObjectDisposedException when the request is already disposed fix: Catch System.ObjectDisposedException when the request is already disposed Mar 4, 2026
@JulianVallee
Copy link
Copy Markdown
Member

JulianVallee commented Mar 7, 2026

@cswpy change looks good, thanks :)

Can you just update the commit message to something like fix(api): gracefully handle already-disposed HTTP requests, so that it has a correct prefix and passes CI checks?

edit: had to close and reopen your PR to trigger a fix in the CI on my side, and the failure for Label PR / Label PR (pull_request) can be ingored

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.ObjectDisposedException when the request is already disposed

2 participants