/// <summary>
        /// Creates another connector and sends a cancel request through it for this connector.
        /// </summary>
        internal void CancelRequest()
        {
            var cancelConnector = new NpgsqlConnector(_settings, false);

            try
            {
                cancelConnector.RawOpen(cancelConnector.ConnectionTimeout*1000);
                cancelConnector.SendSingleMessage(new CancelRequestMessage(BackendProcessId, BackendSecretKey));
            }
            finally
            {
                cancelConnector.Close();
            }
        }
Exemple #2
0
        /// <summary>
        /// Creates another connector and sends a cancel request through it for this connector.
        /// </summary>
        internal void CancelRequest()
        {
            var cancelConnector = new NpgsqlConnector(_settings, false);

            try
            {
                // Get a raw connection, possibly SSL...
                cancelConnector.RawOpen(cancelConnector.ConnectionTimeout*1000);

                // Cancel current request.
                cancelConnector.SendCancelRequest(BackEndKeyData);
            }
            finally
            {
                cancelConnector.Close();
            }
        }