public override void Cancel()
{
NpgsqlEventLog.LogMethodEnter(LogLevel.Debug, CLASSNAME, "Cancel");
try
{
// get copy for thread safety of null test
NpgsqlConnector connector = Connector;
if (connector != null)
{
connector.CancelRequest();
}
}
catch (IOException)
{
Connection.ClearPool();
}
catch (NpgsqlException)
{
// Cancel documentation says the Cancel doesn't throw on failure
}
}