Node-SMB / marsaud-smb2

SMB2 Client
53 stars 46 forks source link

After ten failed connections, a message is displayed indicating that the number of connections reaches the upper limit and smb2 is unavailable #84

Open xiaofenging opened 10 months ago

xiaofenging commented 10 months ago
const SMB2 = require('@marsaud/smb2');
for(let i = 0;i<19;i++){
this.shareConfig = {
            share: sharePath,
            domain: 'DOMAIN',
            username: opt.username,
            password: opt.password,
            autoCloseTimeout: opt.autoCloseTimeout,
        };
this.remoter = new SMB2(this.shareConfig);
this.remoter.exists('a.txt',(err,value)=>{})
}

if the sharePath is a exist path ,everything is perfect. if the sharePath is a error or unexist path ,and we try to connect it many times then throw an error,then the process unable to use the smb create connection

Error: STATUS_REQUEST_NOT_ACCEPTED (0xC00000D0) : No more connections can be made to this remote computer at this time because the computer has already accepted the maximum number of connections.

xiaofenging commented 10 months ago

I'd really appreciate it if someone could help me with this