xmpp: Serve returns error when connection is closed #248
Labels
No Label
bug
CI
documentation
duplicate
enhancement
good first issue
help wanted
i18n
invalid
needs-investigation
ops
proposal
proposal-accepted
proposal-declined
question
refactor
security
testing
upstream
wontfix
Kind: Breaking
Kind: Bug
Kind: Documentation
Kind: Enhancement
Kind: Feature
Kind: Maintenance
Kind: Question
Kind: Security
Kind: Testing
Priority: Critical
Priority: High
Priority: Low
Priority: Medium
Reviewed: Confirmed
Reviewed: Duplicate
Reviewed: Invalid
Status: Blocked
Status: Completed
Status: Help wanted
Status: In progress
Status: Needs feedback
Status: Stale
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: mellium/xmpp#248
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
When doing something like the following common pattern:
After the deferred function is run,
Serve
returns an error:This is probably a blocked call to
Read
in the token decoder returning and is an expected error that can be ignored. However, this means thatsession.Close()
did not unblock the read call. We should dig in and confirm that this is what's happening, and make sure Reads get unblocked cleanly if possible.It looks like
*Session.Close()
returns immediately after sending the stream close element. It should probably block until it receives a</stream:stream>
in reply. This may not be easy with the current architecture though, and I'm not 100% sure that it will matter to fixing this problem either way.7ce4904317/session.go (L824-L854)