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 {
123
123
let mut api_sock = ZSock :: new ( SocketType :: REQ ) ;
124
124
user_cert. apply ( & mut api_sock) ;
125
125
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 ) ) ;
128
128
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 ) ) ;
129
131
130
132
let mut file_sock = ZSock :: new ( SocketType :: DEALER ) ;
131
133
user_cert. apply ( & mut file_sock) ;
132
134
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 ) ) ;
135
137
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 ) ) ;
136
140
137
141
let mut me = Host {
138
142
hostname : hostname. into ( ) ,
You can’t perform that action at this time.
0 commit comments