slight adjust email retry timeout

This commit is contained in:
Dave Conway-Jones 2020-01-31 21:46:42 +00:00
parent 90a00279c0
commit 5780b2a5c3
No known key found for this signature in database
GPG Key ID: 302A6725C594817F
2 changed files with 81 additions and 78 deletions

View File

@ -158,6 +158,9 @@ module.exports = function(RED) {
this.repeat = 2147483647;
this.error(RED._("email.errors.refreshtoolarge"));
}
if (this.repeat < 1500) {
this.repeat = 1500;
}
if (this.inputs === 1) { this.repeat = 0; }
this.inserver = n.server || (globalkeys && globalkeys.server) || "imap.gmail.com";
this.inport = n.port || (globalkeys && globalkeys.port) || "993";
@ -451,8 +454,8 @@ module.exports = function(RED) {
port: node.inport,
tls: node.useSSL,
tlsOptions: { rejectUnauthorized: false },
connTimeout: node.repeat,
authTimeout: node.repeat
connTimeout: node.repeat - 500,
authTimeout: node.repeat - 500
});
imap.on('error', function(err) {
if (err.errno !== "ECONNRESET") {

View File

@ -1,6 +1,6 @@
{
"name": "node-red-node-email",
"version": "1.7.5",
"version": "1.7.6",
"description": "Node-RED nodes to send and receive simple emails",
"dependencies": {
"imap": "^0.8.19",