summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'libcli')
-rw-r--r--libcli/smb/tstream_smbXcli_np.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcli/smb/tstream_smbXcli_np.c b/libcli/smb/tstream_smbXcli_np.c
index af0863e50bb..a59db13321b 100644
--- a/libcli/smb/tstream_smbXcli_np.c
+++ b/libcli/smb/tstream_smbXcli_np.c
@@ -111,7 +111,11 @@ static int tstream_smbXcli_np_destructor(struct tstream_smbXcli_np *cli_nps)
* Once we've fixed all callers to call
* tstream_disconnect_send()/_recv(), this will
* never be called.
+ *
+ * We use a maximun timeout of 1 second == 1000 msec.
*/
+ cli_nps->timeout = MIN(cli_nps->timeout, 1000);
+
if (cli_nps->is_smb1) {
status = smb1cli_close(cli_nps->conn,
cli_nps->timeout,