File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -202,15 +202,19 @@ impl TcpStream {
202
202
setsockopt ( & self . inner , libc:: IPPROTO_TCP , libc:: TCP_KEEPALIVE ,
203
203
seconds as c_int )
204
204
}
205
- #[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" ) ) ]
205
+ #[ cfg( any( target_os = "freebsd" ,
206
+ target_os = "dragonfly" ,
207
+ target_os = "linux" ) ) ]
206
208
fn set_tcp_keepalive ( & self , seconds : u32 ) -> io:: Result < ( ) > {
207
209
setsockopt ( & self . inner , libc:: IPPROTO_TCP , libc:: TCP_KEEPIDLE ,
208
210
seconds as c_int )
209
211
}
212
+
210
213
#[ cfg( not( any( target_os = "macos" ,
211
214
target_os = "ios" ,
212
215
target_os = "freebsd" ,
213
- target_os = "dragonfly" ) ) ) ]
216
+ target_os = "dragonfly" ,
217
+ target_os = "linux" ) ) ) ]
214
218
fn set_tcp_keepalive ( & self , _seconds : u32 ) -> io:: Result < ( ) > {
215
219
Ok ( ( ) )
216
220
}
You can’t perform that action at this time.
0 commit comments