Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

foo & bla example seem to be broken #13

dscape opened this Issue December 27, 2012 · 7 comments

4 participants

Nuno Job Paolo Fragomeni Charlie Robbins Maciej Małecki
Nuno Job

foo.js should connect to bla.js, etc.

However this doesn't work because foo.js throws the following exception:

          throw arguments[1]; // Unhandled 'error' event
Error: NsSocket: sending on a bad socket
    at NsSocket.send (/Users/dscape/Desktop/dev/nodejitsu/nssocket/lib/nssocket.js:101:31)
    at Socket.<anonymous> (/Users/dscape/Desktop/dev/nodejitsu/nssocket/examples/foo.js:10:14)
    at Socket.EventEmitter.emit (events.js:123:20)
    at Object.afterConnect [as oncomplete] (net.js:751:10)

This is because the socket is not considered to be connected: While it is a writable socket it is not readable as no server is created in the foo.js example.


this.connected = this.socket.writable && this.socket.readable || false;


this.connected = this.socket.writable || this.socket.readable || false;

Would solve the issue, but I'm unaware of other consequences this could have. Thoughts?

Maciej Małecki

This issue's title is hilarious.

Charlie Robbins

Lost comment from @hij1nx found in my Github feed. comments

Paolo Fragomeni

That img kind of takes my comment out of context; either way, I recommend using

Charlie Robbins

Kinda conflating two things no? Why don't the examples work?

Paolo Fragomeni

It depends on why the issue came up. But @dscape's suggestion looks perfectly fine to me. This issue appears to have been introduced with the addition of binary support. We should consider this a review. I will close and look to @dscape for his commit.

Paolo Fragomeni hij1nx closed this December 27, 2012
Charlie Robbins indexzero reopened this December 27, 2012
Charlie Robbins

The issue still exists, so we should leave it open yeah? @dscape can reference it in his PR.

Charlie Robbins

Fixed in #17.

Charlie Robbins indexzero closed this April 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.