X-Git-Url: http://git.samba.org/?p=samba.git;a=blobdiff_plain;f=source3%2Flib%2Futil_sock.c;fp=source3%2Flib%2Futil_sock.c;h=0b7029706a6a6928f75cbe745f12652881d1c2e7;hp=e48cdb07ca9a5fdeac62544315bb43befad202ad;hb=3a7480d6124e39dcf99c67e602e0c2837e22d438;hpb=09ea7248e017eddd4764a2b643b720b73c6ec21b diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index e48cdb07ca9..0b7029706a6 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -481,7 +481,8 @@ struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx, tevent_req_set_cleanup_fn(req, open_socket_out_cleanup); - if (!tevent_req_set_endtime( + if ((timeout != 0) && + !tevent_req_set_endtime( req, ev, timeval_current_ofs_msec(timeout))) { tevent_req_oom(req); return tevent_req_post(req, ev);