Skip to content

Commit

Permalink
Disable backpressure
Browse files Browse the repository at this point in the history
  • Loading branch information
boris-sinyapkin committed May 16, 2024
1 parent 63e435b commit dadd0f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub async fn establish_tcp_connection_with_opts(endpoint: &Address, tcp_opts: &T
Ok(tcp_stream)
}

#[allow(unused_imports, unused_variables)]
pub mod listener {

use super::connection::{LurkTcpConnection, LurkTcpConnectionFactory, LurkTcpConnectionLabel};
Expand All @@ -68,7 +69,7 @@ pub mod listener {
/// Custom implementation of TCP listener.
#[allow(dead_code)]
pub struct LurkTcpListener {
incoming: Backpressure<TcpListenerStream>,
incoming: TcpListenerStream,
factory: LurkTcpConnectionFactory,
local_addr: SocketAddr,
}
Expand All @@ -86,7 +87,7 @@ pub mod listener {

// Create backpressure limit and supply the receiver to the created stream.
let (bp_tx, bp_rx) = backpressure::new(conn_limit);
let incoming = TcpListenerStream::new(listener).apply_backpressure(bp_rx);
let incoming = TcpListenerStream::new(listener);

Ok(LurkTcpListener {
incoming,
Expand Down Expand Up @@ -131,6 +132,7 @@ pub mod listener {
/// should put on hold some of them and handle only allowed number of
/// them in parallel.
#[tokio::test]
#[ignore]

async fn limit_tcp_connections() {
let conn_limit = 5;
Expand Down

0 comments on commit dadd0f5

Please sign in to comment.