Skip to content

Commit

Permalink
Tune idle timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Jun 27, 2024
1 parent cff739e commit d96d26a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

## [3.0.2] - 2024-06-27

* Tune idle timeout

## [3.0.1] - 2024-06-04

* Better handling "session end" for inflight deliveries
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ntex-amqp"
version = "3.0.1"
version = "3.0.2"
authors = ["ntex contributors <[email protected]>"]
description = "AMQP 1.0 Client/Server framework"
documentation = "https://docs.rs/ntex-amqp"
Expand Down
6 changes: 3 additions & 3 deletions src/dispatcher.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::collections::VecDeque;
use std::{
cell, future::poll_fn, future::Future, marker, pin::Pin, rc::Rc, task::Context, task::Poll,
};
use std::task::{Context, Poll};
use std::{cell, cmp, future::poll_fn, future::Future, marker, pin::Pin, rc::Rc};

use ntex::service::{Pipeline, PipelineBinding, PipelineCall, Service, ServiceCtx};
use ntex::time::{sleep, Millis, Sleep};
Expand Down Expand Up @@ -48,6 +47,7 @@ where
ctl_service: Pipeline<Ctl>,
idle_timeout: Millis,
) -> Self {
let idle_timeout = Millis(cmp::min(idle_timeout.0 >> 1, 1000));
let ctl_queue = sink.get_control_queue().clone();
Dispatcher {
sink,
Expand Down
2 changes: 1 addition & 1 deletion src/sndlink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl SenderLinkInner {
}

pub(crate) fn remote_detached(&mut self, err: AmqpProtocolError) {
log::error!(
log::trace!(
"{}: Detaching sender link {:?} with error {:?}",
self.session.tag(),
self.name,
Expand Down

0 comments on commit d96d26a

Please sign in to comment.