Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug-fix: unclosed tls stream #132

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions zino-cli/src/cli/deploy.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::structs::ZinoToml;
use clap::Parser;
use git2::{FetchOptions, Remote, Repository, ResetType};
use humantime_serde::re::humantime::format_duration;
Expand All @@ -7,14 +8,11 @@ use std::{
net::Ipv4Addr,
process::{Child, Command},
};
use tracing::{error, info, warn};

use tokio::io::AsyncWriteExt;
use tokio_stream::StreamExt;

use tracing::{error, info, warn};
use zino_core::error::Error;

use crate::structs::ZinoToml;

/// Deploy a zino project.
#[derive(Parser)]
#[clap(name = "deploy")]
Expand Down Expand Up @@ -372,6 +370,11 @@ impl AcmeManager {
Error::new(format!("failed to forward connection: {}", err))
})?;

tls.shutdown().await.map_err(|err| {
error!("Failed to close TLS connection: {}", err);
Error::new(format!("failed to close TLS connection: {}", err))
})?;

Ok(())
}
}
Loading