Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <[email protected]>
  • Loading branch information
Jarema committed Oct 23, 2024
1 parent 53c7496 commit 4713596
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions async-nats/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ impl Connector {
tls_required: bool,
server_addr: ServerAddr,
) -> Result<(ServerInfo, Connection), ConnectError> {
println!("entering try connect");
let mut connection = match server_addr.scheme() {
"ws" => {
let ws = tokio::time::timeout(
Expand Down Expand Up @@ -380,14 +379,12 @@ impl Connector {
Connection::new(Box::new(con), 0, self.connect_stats.clone())
}
_ => {
println!("Connecting to {}", socket_addr);
let tcp_stream = tokio::time::timeout(
self.options.connection_timeout,
TcpStream::connect(socket_addr),
)
.await
.map_err(|_| ConnectError::new(crate::ConnectErrorKind::TimedOut))??;
println!("Connected to {:?}", tcp_stream);
tcp_stream.set_nodelay(true)?;

Connection::new(
Expand Down
2 changes: 1 addition & 1 deletion async-nats/src/jetstream/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ impl<I> Stream<I> {
///
/// ```no_run
/// #[tokio::main]
/// # async fn mains() -> Result<(), async_nats::Error> {
/// # async fn main() -> Result<(), async_nats::Error> {
/// use futures::StreamExt;
/// use futures::TryStreamExt;
///
Expand Down

0 comments on commit 4713596

Please sign in to comment.