Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/conn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ impl Conn {
{
Stream::connect_socket(_path.to_owned()).await?
}
#[cfg(target_os = "windows")]
#[cfg(not(unix))]
return Err(crate::DriverError::NamedPipesDisabled.into());
} else {
let keepalive = opts
Expand Down
2 changes: 2 additions & 0 deletions src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use bytes::BytesMut;
use futures_core::{ready, stream};
use mysql_common::proto::codec::PacketCodec as PacketCodecInner;
use pin_project::pin_project;
#[cfg(any(unix, windows))]
use socket2::{Socket as Socket2Socket, TcpKeepalive};
#[cfg(unix)]
use tokio::io::AsyncWriteExt;
Expand Down Expand Up @@ -378,6 +379,7 @@ impl Stream {
}
};

#[cfg(any(unix, windows))]
if let Some(duration) = keepalive {
#[cfg(unix)]
let socket = {
Expand Down