methods signatures shorten
This commit is contained in:
parent
ef9f1b2847
commit
ce7a0ceb42
@ -53,9 +53,7 @@ impl FlowgateServer {
|
||||
});
|
||||
}
|
||||
|
||||
pub async fn run_http(
|
||||
self: Arc<Self>
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
pub async fn run_http(self: Arc<Self>) -> Result<(), Box<dyn Error>> {
|
||||
let listener = TcpListener::bind(&self.config.http_host).await?;
|
||||
|
||||
info!("HTTP server runned on {}", &self.config.http_host);
|
||||
@ -84,9 +82,7 @@ impl FlowgateServer {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn run_https(
|
||||
self: Arc<Self>
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
pub async fn run_https(self: Arc<Self>) -> Result<(), Box<dyn Error>> {
|
||||
let listener = TcpListener::bind(&self.config.https_host).await?;
|
||||
let acceptor = TlsAcceptor::from(Arc::new(create_server_config(self.config.clone()).await));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user