Added reconnection in failure method (for some reason close socket was not called)
Make reconnection timer non-repeating (as it's fired after failed try anyway)
Merge pull request #2 from mlepicki/master

Improve reconnection mechanism