Emit error when error code is returned from socket write - fixes #153.
Merge branch 'master' of https://github.com/flackr/circ