Attempt connection to socketio server a couple of times before giving up