mirror of
https://github.com/moparisthebest/mail
synced 2025-01-10 13:07:59 -05:00
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,
|
||||
ignoreTLS: this.credentials.imap.ignoreTLS,
|
||||
ca: this.credentials.imap.ca,
|
||||
tlsWorkerPath: cfg.workerPath + '/tcp-socket-tls-worker.js',
|
||||
auth: {
|
||||
user: this.credentials.username,
|
||||
pass: this.credentials.password,
|
||||
@ -63,6 +64,7 @@ ConnectionDoctor.prototype.configure = function(credentials) {
|
||||
useSecureTransport: this.credentials.smtp.secure,
|
||||
ignoreTLS: this.credentials.smtp.ignoreTLS,
|
||||
ca: this.credentials.smtp.ca,
|
||||
tlsWorkerPath: cfg.workerPath + '/tcp-socket-tls-worker.js',
|
||||
auth: {
|
||||
user: this.credentials.username,
|
||||
pass: this.credentials.password,
|
||||
@ -156,7 +158,8 @@ ConnectionDoctor.prototype._checkReachable = function(options, callback) {
|
||||
socket = TCPSocket.open(options.host, options.port, {
|
||||
binaryType: 'arraybuffer',
|
||||
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
|
||||
@ -290,4 +293,4 @@ function createError(code, message, underlyingError) {
|
||||
return error;
|
||||
}
|
||||
|
||||
module.exports = ConnectionDoctor;
|
||||
module.exports = ConnectionDoctor;
|
||||
|
Loading…
Reference in New Issue
Block a user