Skip to content

End a session quietly when FreeSWITCH resets the socket - #19

Closed
henrikbjorn wants to merge 1 commit into
reply-matches-commandfrom
quiet-connection-reset
Closed

henrikbjorn wants to merge 1 commit into
reply-matches-commandfrom
quiet-connection-reset

Conversation

@henrikbjorn

Copy link
Copy Markdown
Member

Stacked on #18.

When FreeSWITCH reset a call's socket (e.g. on uuid_kill), the reader task ended with IO::Stream::ConnectionResetError, and Async logged "Task may have ended with unhandled exception" for every such call. switch/receptionist saw it repeatedly.

A reset or close from the peer (IOError, ECONNRESET, EPIPE) now ends the session the same way as reaching the end of the stream. The listener still gets connection_closed, so pending promises are rejected as before.

Tests

  • The new session_reset_test.rb errors without the fix and passes with it.
  • bundle exec rake test: 127 runs.

When FreeSWITCH reset a call's socket (e.g. on uuid_kill), the reader
task ended with IO::Stream::ConnectionResetError, and Async logged
"Task may have ended with unhandled exception" for every such call. A
reset or close from the peer now ends the session the same way as
reaching the end of the stream. The listener still gets
connection_closed, so pending promises are rejected as before.
@henrikbjorn

Copy link
Copy Markdown
Member Author

Folded into #25, which collects these changes in one PR.

@henrikbjorn henrikbjorn closed this Oct 1, 2026
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.

1 participant