fixed #5. Try to connect to socket 10 times, fail after.