Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2087 from ldorau/test-add-sleep1-in-mtt_client_co…
Browse files Browse the repository at this point in the history
…nnect-before-the-next-retry

test: add sleep(1) to mtt_client_connect() before the next retry
  • Loading branch information
ldorau committed Jan 3, 2023
2 parents a5e600b + b4eda00 commit 3f8d14c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- detecting no free slot for a new connection request in example 13
- memory allocations in example 07
- minor issues detected by Coverity
- sleep(1) added to mtt_client_connect() before the next connection retry

### Changed
- the default 'master' branch has been renamed to 'main'
Expand Down
4 changes: 3 additions & 1 deletion tests/multithreaded/common/mtt_connect.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2022, Intel Corporation */
/* Copyright 2022-2023, Intel Corporation */

/*
* mtt_connect.c -- common connection code of multithreaded tests
*/

#include <stdlib.h>
#include <librpma.h>
#include <unistd.h>

#include "mtt.h"

Expand Down Expand Up @@ -248,6 +249,7 @@ mtt_client_connect(struct mtt_result *tr, char *addr, unsigned port,
/* received the RPMA_CONN_REJECTED event, retrying ... */
(void) rpma_conn_disconnect(*conn_ptr);
(void) rpma_conn_delete(conn_ptr);
sleep(1);

} while (retry < MAX_CONN_RETRY);

Expand Down

0 comments on commit 3f8d14c

Please sign in to comment.