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
How can this url.readEntireTextStream() be properly canceled?
Calling (from within the OverlayComp)
stopThread (0); delete this;
will leak an URLConnectionState.