xmpp: earlyCloser not working for muxed IQs #247

Open
opened 1 year ago by SamWhited · 0 comments
Owner

The earlyCloser was recently added to let handlers release their lock on the input stream quicker by calling close when io.EOF is read through the stream. Unfortunately, for IQs the mux package further limits the stream before passing it to the IQHandler using xmlstream.Inner. This means that the new reader sees that we've reached the end of the stream and returns nil, io.EOF without reading past the last element, so the wrapped earlyCloser never has EOF read through it.

The `earlyCloser` was recently added to let handlers release their lock on the input stream quicker by calling close when `io.EOF` is read through the stream. Unfortunately, for IQs the `mux` package further limits the stream before passing it to the `IQHandler` using `xmlstream.Inner`. This means that the new reader sees that we've reached the end of the stream and returns `nil, io.EOF` without reading past the last element, so the wrapped `earlyCloser` never has EOF read through it.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mellium/xmpp#247
Loading…
There is no content yet.