fix for connection errors

this commit calls back early on connection errors so we don't
get more uncaught exceptions.

@ivolo @visionmedia @juliangruber