PgAlerter cannot Stop when connection is lost
Posted: Thu 05 Jul 2012 08:57
Hello,
How can I stop a PgAlerter when connection is lost?
Example:
...
PgConnection.Connect;
PgAlerter.Start;
... stop PG server (from PgAdmim)
now, in debugger get socket error 10054
... restart PG server
PgAlerter.Stop; // -> socket error 10054
PgConnection.Disconnect; // -> an infinite loop with socket error 10054 (debug). Looks like the listening thread doesn't terminate on error.
If the PgAlerter is not started everything is fine, Disconnect works.
Thanks,
Adrian
How can I stop a PgAlerter when connection is lost?
Example:
...
PgConnection.Connect;
PgAlerter.Start;
... stop PG server (from PgAdmim)
now, in debugger get socket error 10054
... restart PG server
PgAlerter.Stop; // -> socket error 10054
PgConnection.Disconnect; // -> an infinite loop with socket error 10054 (debug). Looks like the listening thread doesn't terminate on error.
If the PgAlerter is not started everything is fine, Disconnect works.
Thanks,
Adrian