Monday, 23 May 2022
  1 Replies
  897 Visits
When watchdog is enabled, if there is a disconnection and the client tries to reconnect, the form is locked till connects or fails. Any solution?
2 years ago

The WatchDog property tries to reconnect using blocking mode if NotifyEvents <> neNoSync or the connection has started using blocking mode.
You can override this behaviour using the event OnBeforeWatchDog. Do the following:

procedure OnBeforeWatchDog(Sender: TObject; var Handled: Boolean);
Handled := True;

This event is called before the Watchdog is trying to reconnect. You can call here the async method "Start" to reconnect, and avoid the WatchDog automatically reconnect setting the parameter Handled := true, this means the reconnection is handled by you, not by the component.

Kind regards,
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf
· Insert · Remove
  Upload Files (Maximum 10MB)