I notice Firebird 3 connection problem.
TZConnection.Ping
TZConnection.PingServer
The situation:
I write code in a loop fetching some data one per second (SELECT)
Every loop I check:
if TZConnection.PingServer then if TZConnection.Connected then // Fetch one row with TZQuery and close dataset
While my app is working I stop Firebird service via Administration/Services
I hope that .Ping() or .PingServer() will return false in next loop.
But instead I get the exception SIGSEGV:
ZPlainFirebird.pas
line 4114: ReferenceCountedVTable(vTable).addRef(Self);
So, how can i make sure the connection is not dropped?
For example, if the network or FB-server is down
Diff:
Seems like bug indeed but why you need to ping? Just execute query and check results/exceptions
I think Ping - is a lightweight operation and much faster then query. It's comfortable to use .Ping as a background process and so on.
There is a feature request to implement ping for the new Firebird driver. As far as I understand it, PinServer doesn't work correctly on Firebird (yet).
Hello,
I think I might have solved that yesterday in [r7647] / [r7648]. Could you please test the current SVN again?
Best regards,
Jan
Related
Commit: [r7647]
Commit: [r7648]
Another note: Zeos 8.0 will raise an EZConnectionLost exception when you do something and the server has stopped responding. So you might do the row fetching and wait for that exception without doing ping.