mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Behind a reverse proxy the DDP connection can drop and come back while a card's link is still loading (a WebSocket upgrade the proxy refuses, SockJS falling back). Every subscription re-runs on the way back, one answers before the resumed login with nothing, and the card leaves Minimongo for a moment. #3114's close-on-removal took that moment for a deletion: it closed the card and went to the board's address. The window now waits while the subscription, the connection or the login is settling, and when the card looks gone with everything settled, asks the server (cards.openCardAvailable, the 'card' publication's own rule, now one function in server/lib/openCardAccess.js) and closes only on its no, if Minimongo still agrees. A card really deleted, archived or moved elsewhere still closes. Not reproduced here: no proxy in this environment; the browser test drops and restores the connection. Thanks to brlin-tw and xet7 ! Fixes #6808.