Due to scheduling, the client could attempt to connect to the server before the server starts to accept. Make the client retry multiple times before returning with error.