mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-06-03 13:50:40 +00:00
feat: Implements shutdown for GrpcServer and HttpServer (#372)
* fix: Fix TestGuard being dropped before grpc test starts * feat: Let start and shutdown takes immutable reference to self Also implement shutdown for GrpcServer * feat: Implement shutdown for HttpServer * style: Fix clippy * chore: Add name to AlreadyStarted error
This commit is contained in:
@@ -131,7 +131,7 @@ fn parse_addr(addr: &str) -> Result<SocketAddr> {
|
||||
async fn start_server(
|
||||
server_and_addr: Option<(Box<dyn Server>, SocketAddr)>,
|
||||
) -> servers::error::Result<Option<SocketAddr>> {
|
||||
if let Some((mut server, addr)) = server_and_addr {
|
||||
if let Some((server, addr)) = server_and_addr {
|
||||
server.start(addr).await.map(Some)
|
||||
} else {
|
||||
Ok(None)
|
||||
|
||||
Reference in New Issue
Block a user