Skip to content

Commit 169bff6

Browse files
authored
Tune idle timeout (#55)
1 parent cff739e commit 169bff6

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## [3.0.2] - 2024-06-27
4+
5+
* Tune idle timeout
6+
37
## [3.0.1] - 2024-06-04
48

59
* Better handling "session end" for inflight deliveries

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ntex-amqp"
3-
version = "3.0.1"
3+
version = "3.0.2"
44
authors = ["ntex contributors <[email protected]>"]
55
description = "AMQP 1.0 Client/Server framework"
66
documentation = "https://docs.rs/ntex-amqp"

src/dispatcher.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::collections::VecDeque;
2-
use std::{
3-
cell, future::poll_fn, future::Future, marker, pin::Pin, rc::Rc, task::Context, task::Poll,
4-
};
2+
use std::task::{Context, Poll};
3+
use std::{cell, cmp, future::poll_fn, future::Future, marker, pin::Pin, rc::Rc};
54

65
use ntex::service::{Pipeline, PipelineBinding, PipelineCall, Service, ServiceCtx};
76
use ntex::time::{sleep, Millis, Sleep};
@@ -48,6 +47,7 @@ where
4847
ctl_service: Pipeline<Ctl>,
4948
idle_timeout: Millis,
5049
) -> Self {
50+
let idle_timeout = Millis(cmp::min(idle_timeout.0 >> 1, 1000));
5151
let ctl_queue = sink.get_control_queue().clone();
5252
Dispatcher {
5353
sink,

src/sndlink.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl SenderLinkInner {
235235
}
236236

237237
pub(crate) fn remote_detached(&mut self, err: AmqpProtocolError) {
238-
log::error!(
238+
log::trace!(
239239
"{}: Detaching sender link {:?} with error {:?}",
240240
self.session.tag(),
241241
self.name,

0 commit comments

Comments
 (0)