Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157008169
D16293.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D16293.diff
View Options
Index: head/sys/rpc/clnt_rc.c
===================================================================
--- head/sys/rpc/clnt_rc.c
+++ head/sys/rpc/clnt_rc.c
@@ -174,10 +174,26 @@
newclient = clnt_dg_create(so,
(struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers,
rc->rc_sendsz, rc->rc_recvsz);
- else
+ else {
+ /*
+ * I do not believe a timeout of less than 1sec would make
+ * sense here since short delays can occur when a server is
+ * temporarily overloaded.
+ */
+ if (rc->rc_timeout.tv_sec > 0 && rc->rc_timeout.tv_usec >= 0) {
+ error = so_setsockopt(so, SOL_SOCKET, SO_SNDTIMEO,
+ &rc->rc_timeout, sizeof(struct timeval));
+ if (error != 0) {
+ stat = rpc_createerr.cf_stat = RPC_CANTSEND;
+ rpc_createerr.cf_error.re_errno = error;
+ td->td_ucred = oldcred;
+ goto out;
+ }
+ }
newclient = clnt_vc_create(so,
(struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers,
rc->rc_sendsz, rc->rc_recvsz, rc->rc_intr);
+ }
td->td_ucred = oldcred;
if (!newclient) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 10:35 PM (12 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33272706
Default Alt Text
D16293.diff (1 KB)
Attached To
Mode
D16293: when CLSET_TIMEOUT is used, set timeouts for sosend() and soconnect() in the krpc
Attached
Detach File
Event Timeline
Log In to Comment