Skip to content
New issue

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

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

Already on GitHub? # to your account

xcb:-connection-setup-filter drops data #8

Open
Stebalien opened this issue Jan 14, 2024 · 2 comments
Open

xcb:-connection-setup-filter drops data #8

Stebalien opened this issue Jan 14, 2024 · 2 comments

Comments

@Stebalien
Copy link
Contributor

I'm pretty sure it's supposed to put any unread messages back in the message cache, but it doesn't.

@medranocalvo
Copy link
Contributor

I had just a brief look.

If we assume that the filter can be invoked while running (why else would we 'lock?), then we should:

 (setf (slot-value connection 'message-cache) (substring (slot-value connection 'message-cache) data-len))

at the end, instead of setting possibly outdated cache. This should happen just before releasing the 'lock. (Or will the process sentinel (and therefore xcb:disconnect) run immediately after the errors?).

The ;; Connection established case should not clear the 'message-cache.

@Stebalien
Copy link
Contributor Author

I think that's the correct answer?

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

No branches or pull requests

2 participants