[fix] Memory leak when error (close #4)
Merge pull request #6 from xively/fix-#4-connection-memory-leaks

[fix] Memory leak when error (close #4)