Merge pull request #112 from tribal-tec/master

Fix racy connection handshake