mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Fix email node timeout when triggered manually
This commit is contained in:
parent
bf089ec18c
commit
55f6609a4f
@ -447,6 +447,7 @@ module.exports = function(RED) {
|
|||||||
} // End of checkEmail
|
} // End of checkEmail
|
||||||
|
|
||||||
if (node.protocol === "IMAP") {
|
if (node.protocol === "IMAP") {
|
||||||
|
var tout = (node.repeat > 0) ? node.repeat - 500 : 15000;
|
||||||
imap = new Imap({
|
imap = new Imap({
|
||||||
user: node.userid,
|
user: node.userid,
|
||||||
password: node.password,
|
password: node.password,
|
||||||
@ -454,8 +455,8 @@ module.exports = function(RED) {
|
|||||||
port: node.inport,
|
port: node.inport,
|
||||||
tls: node.useSSL,
|
tls: node.useSSL,
|
||||||
tlsOptions: { rejectUnauthorized: false },
|
tlsOptions: { rejectUnauthorized: false },
|
||||||
connTimeout: node.repeat - 500,
|
connTimeout: tout,
|
||||||
authTimeout: node.repeat - 500
|
authTimeout: tout
|
||||||
});
|
});
|
||||||
imap.on('error', function(err) {
|
imap.on('error', function(err) {
|
||||||
if (err.errno !== "ECONNRESET") {
|
if (err.errno !== "ECONNRESET") {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-node-email",
|
"name": "node-red-node-email",
|
||||||
"version": "1.7.6",
|
"version": "1.7.7",
|
||||||
"description": "Node-RED nodes to send and receive simple emails",
|
"description": "Node-RED nodes to send and receive simple emails",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"imap": "^0.8.19",
|
"imap": "^0.8.19",
|
||||||
|
Loading…
Reference in New Issue
Block a user