File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
crates/rproxy/src/server/proxy Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ impl ConnectionGuard {
111111
112112 if let Some ( stream) = stream {
113113 #[ cfg( target_os = "linux" ) ]
114- {
114+ unsafe {
115115 libc:: setsockopt (
116116 stream. as_fd ( ) . as_raw_fd ( ) ,
117117 libc:: IPPROTO_TCP ,
@@ -136,16 +136,14 @@ impl ConnectionGuard {
136136 }
137137
138138 #[ cfg( target_os = "macos" ) ]
139- {
140- unsafe {
141- libc:: setsockopt (
142- stream. as_fd ( ) . as_raw_fd ( ) ,
143- libc:: IPPROTO_TCP ,
144- libc:: TCP_KEEPALIVE ,
145- & keep_alive_interval as * const _ as * const _ ,
146- std:: mem:: size_of_val ( & keep_alive_interval) as libc:: socklen_t ,
147- ) ;
148- }
139+ unsafe {
140+ libc:: setsockopt (
141+ stream. as_fd ( ) . as_raw_fd ( ) ,
142+ libc:: IPPROTO_TCP ,
143+ libc:: TCP_KEEPALIVE ,
144+ & keep_alive_interval as * const _ as * const _ ,
145+ std:: mem:: size_of_val ( & keep_alive_interval) as libc:: socklen_t ,
146+ ) ;
149147 }
150148 }
151149
You can’t perform that action at this time.
0 commit comments