Change the default number of connection attempts to 2
Change the default number of connection attempts to 2

Also decreased the delay between consecutive attempts to 0.5s.
Fixed sleep logic so that the connection handler doesn't sleep
after the last connection attempt and returns immediately.

futuresimple/mantrid