diff options
-rw-r--r-- | source3/libsmb/async_smb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 2f1f45c0a6..4518518a43 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -424,9 +424,11 @@ struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx, } state->iov_count = iov_count + 3; - endtime = timeval_current_ofs(0, cli->timeout * 1000); - if (!tevent_req_set_endtime(result, ev, endtime)) { - tevent_req_nomem(NULL, result); + if (cli->timeout) { + endtime = timeval_current_ofs(0, cli->timeout * 1000); + if (!tevent_req_set_endtime(result, ev, endtime)) { + tevent_req_nomem(NULL, result); + } } return result; } |