After a user has entered his credentials, the OnlineUnlockForm displays a modal overlay with a spinner (OnlineUnlockForm::OverlayComp). I want to add a cancel button to this overlay, because with an aggressive firewall or a not or really slow responding server it can happen that this overlay just stays indefinitely without providing the user an option to escape.
In essence, the OverlayComp is/starts a Thread that calls
url.readEntireTextStream()
via TracktionMarketplaceStatus::readReplyFromWebserver().
How can this url.readEntireTextStream() be properly canceled?
I’ve added an optional argument to the OnlineUnlockForm constructor to specify whether the OverlayComp should contain a cancel button. It’s on develop here.
Yeah, this is more of an issue with the TracktionMarketplaceStatus::readReplyFromWebserver() implementation as it should have a cancellable operation instead of just calling readEntireTextStream(). I’ll take a look at this later today and see if I can replace it with something that exits more gracefully when the thread is stopped.