Skip to content
Browse files

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
  • Loading branch information...
1 parent 3e0f4eb commit 12a8c1417c46ac654818be2f7c6a4a5c086e7e08 @argon committed Sep 22, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/connection.js
View
4 lib/connection.js
@@ -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);

1 comment on commit 12a8c14

@goelvivek

This commit is creating issue in node older version. I am getting following error
[TypeError: Object # has no method 'connect']

Please sign in to comment.
Something went wrong with that request. Please try again.