fix reconnection after reconnecting manually
Merge pull request #767 from nkzawa/patch-12

fix reconnection after reconnecting manually