File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -123,16 +123,20 @@ impl Host {
123123 let mut api_sock = ZSock :: new ( SocketType :: REQ ) ;
124124 user_cert. apply ( & mut api_sock) ;
125125 api_sock. set_curve_serverkey ( server_cert. public_txt ( ) ) ;
126- api_sock. set_sndtimeo ( Some ( 1800000 ) ) ;
127- api_sock. set_rcvtimeo ( Some ( 1800000 ) ) ;
126+ api_sock. set_sndtimeo ( Some ( 10000 ) ) ; // 10 seconds
127+ api_sock. set_rcvtimeo ( Some ( 10000 ) ) ;
128128 try!( api_sock. connect ( & format ! ( "tcp://{}:{}" , hostname, api_port) ) ) ;
129+ api_sock. set_sndtimeo ( Some ( 1800000 ) ) ; // 30 minutes
130+ api_sock. set_rcvtimeo ( Some ( 1800000 ) ) ;
129131
130132 let mut file_sock = ZSock :: new ( SocketType :: DEALER ) ;
131133 user_cert. apply ( & mut file_sock) ;
132134 file_sock. set_curve_serverkey ( server_cert. public_txt ( ) ) ;
133- file_sock. set_sndtimeo ( Some ( 1800000 ) ) ;
134- file_sock. set_rcvtimeo ( Some ( 1800000 ) ) ;
135+ file_sock. set_sndtimeo ( Some ( 10000 ) ) ; // 10 seconds
136+ file_sock. set_rcvtimeo ( Some ( 10000 ) ) ;
135137 try!( file_sock. connect ( & format ! ( "tcp://{}:{}" , hostname, file_port) ) ) ;
138+ file_sock. set_sndtimeo ( Some ( 1800000 ) ) ; // 30 minutes
139+ file_sock. set_rcvtimeo ( Some ( 1800000 ) ) ;
136140
137141 let mut me = Host {
138142 hostname : hostname. into ( ) ,
You can’t perform that action at this time.
0 commit comments