Skip to content
New issue

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

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

Already on GitHub? Sign in 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?

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

No branches or pull requests

2 participants