mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-09 03:36:01 +00:00
feat(core): add IoStream::shutdown and IoStream::shutdown_async
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use sqlx_core::{Result, Runtime};
|
||||
use sqlx_core::{io::Stream, Result, Runtime};
|
||||
|
||||
use crate::protocol::Quit;
|
||||
|
||||
@@ -13,6 +13,7 @@ where
|
||||
{
|
||||
self.write_packet(&Quit)?;
|
||||
self.stream.flush_async().await?;
|
||||
self.stream.shutdown_async().await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -24,6 +25,7 @@ where
|
||||
{
|
||||
self.write_packet(&Quit)?;
|
||||
self.stream.flush()?;
|
||||
self.stream.shutdown()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user