Fix for node-0.11.x
Because of a change in TLS socket handling the connection to APNS would never be established under 0.11
This commit is contained in:
Родитель
3e0f4ebc90
Коммит
12a8c1417c
|
@ -183,7 +183,7 @@ Connection.prototype.connect = function () {
|
|||
|
||||
// We pass in our own Stream to delay connection until we have attached the
|
||||
// event listeners below.
|
||||
socketOptions.socket = new net.Stream();
|
||||
socketOptions.socket = new net.Socket();
|
||||
|
||||
this.socket = tls.connect(
|
||||
this.options['port'],
|
||||
|
@ -208,7 +208,7 @@ Connection.prototype.connect = function () {
|
|||
|
||||
// The actual connection is delayed until after all the event listeners have
|
||||
// been attached.
|
||||
socketOptions.socket.connect(this.options['port'], this.options['gateway']);
|
||||
this.socket.connect(this.options['port'], this.options['gateway']);
|
||||
}.bind(this)).fail(function (error) {
|
||||
debug("Module initialisation error:", error);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче