mirror of https://github.com/moparisthebest/mail
Use worker thread in connection doctor
This commit is contained in:
parent
c6c058c2dc
commit
7be6c63060
|
@ -52,6 +52,7 @@ ConnectionDoctor.prototype.configure = function(credentials) {
|
||||||
secure: this.credentials.imap.secure,
|
secure: this.credentials.imap.secure,
|
||||||
ignoreTLS: this.credentials.imap.ignoreTLS,
|
ignoreTLS: this.credentials.imap.ignoreTLS,
|
||||||
ca: this.credentials.imap.ca,
|
ca: this.credentials.imap.ca,
|
||||||
|
tlsWorkerPath: cfg.workerPath + '/tcp-socket-tls-worker.js',
|
||||||
auth: {
|
auth: {
|
||||||
user: this.credentials.username,
|
user: this.credentials.username,
|
||||||
pass: this.credentials.password,
|
pass: this.credentials.password,
|
||||||
|
@ -63,6 +64,7 @@ ConnectionDoctor.prototype.configure = function(credentials) {
|
||||||
useSecureTransport: this.credentials.smtp.secure,
|
useSecureTransport: this.credentials.smtp.secure,
|
||||||
ignoreTLS: this.credentials.smtp.ignoreTLS,
|
ignoreTLS: this.credentials.smtp.ignoreTLS,
|
||||||
ca: this.credentials.smtp.ca,
|
ca: this.credentials.smtp.ca,
|
||||||
|
tlsWorkerPath: cfg.workerPath + '/tcp-socket-tls-worker.js',
|
||||||
auth: {
|
auth: {
|
||||||
user: this.credentials.username,
|
user: this.credentials.username,
|
||||||
pass: this.credentials.password,
|
pass: this.credentials.password,
|
||||||
|
@ -156,7 +158,8 @@ ConnectionDoctor.prototype._checkReachable = function(options, callback) {
|
||||||
socket = TCPSocket.open(options.host, options.port, {
|
socket = TCPSocket.open(options.host, options.port, {
|
||||||
binaryType: 'arraybuffer',
|
binaryType: 'arraybuffer',
|
||||||
useSecureTransport: options.secure,
|
useSecureTransport: options.secure,
|
||||||
ca: options.ca
|
ca: options.ca,
|
||||||
|
tlsWorkerPath: cfg.workerPath + '/tcp-socket-tls-worker.js'
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.ondata = function() {}; // we don't actually care about the data
|
socket.ondata = function() {}; // we don't actually care about the data
|
||||||
|
|
Loading…
Reference in New Issue