public void SendRequest(Message message, TimeSpan timeout) { TimeoutHelper timeoutHelper = new TimeoutHelper(timeout); try { this.connection = connectionPoolHelper.EstablishConnection(timeoutHelper.RemainingTime()); ChannelBindingUtility.TryAddToMessage(this.channel.channelBindingToken, message, false); bool success = false; try { StreamingConnectionHelper.WriteMessage(message, this.connection, true, channel.settings, ref timeoutHelper); success = true; } finally { if (!success) { connectionPoolHelper.Abort(); } } } catch (TimeoutException exception) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError( new TimeoutException(SR.GetString(SR.TimeoutOnRequest, timeout), exception)); } }
private void Cleanup() { _connectionPoolHelper.Abort(); }
void Cleanup() { connectionPoolHelper.Abort(); }