File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,16 @@ impl Host {
4545 let api_sock = ZSock :: new ( ZSockType :: REQ ) ;
4646 user_cert. apply ( & api_sock) ;
4747 api_sock. set_curve_serverkey ( server_cert. public_txt ( ) ) ;
48- api_sock. set_linger ( 5000 ) ;
48+ api_sock. set_sndtimeo ( Some ( 5000 ) ) ;
49+ api_sock. set_rcvtimeo ( Some ( 5000 ) ) ;
4950 try!( api_sock. connect ( & format ! ( "tcp://{}:{}" , hostname, api_port) ) ) ;
5051 self . api_sock = Some ( api_sock) ;
5152
5253 let file_sock = ZSock :: new ( ZSockType :: DEALER ) ;
5354 user_cert. apply ( & file_sock) ;
5455 file_sock. set_curve_serverkey ( server_cert. public_txt ( ) ) ;
55- file_sock. set_linger ( 5000 ) ;
56+ file_sock. set_sndtimeo ( Some ( 5000 ) ) ;
57+ file_sock. set_rcvtimeo ( Some ( 5000 ) ) ;
5658 try!( file_sock. connect ( & format ! ( "tcp://{}:{}" , hostname, file_port) ) ) ;
5759 self . file_sock = Some ( file_sock) ;
5860
You can’t perform that action at this time.
0 commit comments