xelb icon indicating copy to clipboard operation
xelb copied to clipboard

`xcb:-connection-setup-filter` drops data

Open Stebalien opened this issue 1 year ago • 2 comments

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

Stebalien avatar Jan 14 '24 20:01 Stebalien

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.

medranocalvo avatar Jan 19 '24 09:01 medranocalvo

I think that's the correct answer?

Stebalien avatar Jan 19 '24 15:01 Stebalien