File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -913,7 +913,7 @@ impl Conn {
913
913
{
914
914
Stream :: connect_socket ( _path. to_owned ( ) ) . await ?
915
915
}
916
- #[ cfg( target_os = "windows" ) ]
916
+ #[ cfg( not ( unix ) ) ]
917
917
return Err ( crate :: DriverError :: NamedPipesDisabled . into ( ) ) ;
918
918
} else {
919
919
let keepalive = opts
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ use bytes::BytesMut;
12
12
use futures_core:: { ready, stream} ;
13
13
use mysql_common:: proto:: codec:: PacketCodec as PacketCodecInner ;
14
14
use pin_project:: pin_project;
15
+ #[ cfg( any( unix, windows) ) ]
15
16
use socket2:: { Socket as Socket2Socket , TcpKeepalive } ;
16
17
#[ cfg( unix) ]
17
18
use tokio:: io:: AsyncWriteExt ;
@@ -378,6 +379,7 @@ impl Stream {
378
379
}
379
380
} ;
380
381
382
+ #[ cfg( any( unix, windows) ) ]
381
383
if let Some ( duration) = keepalive {
382
384
#[ cfg( unix) ]
383
385
let socket = {
You can’t perform that action at this time.
0 commit comments