Skip to content

Commit 620af85

Browse files
authored
Merge pull request #3002 from DataDog/glopes/restart-usleep
Restart usleep() on EINTR
2 parents d1cfb1e + 669c898 commit 620af85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

appsec/src/extension/network.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int dd_conn_init( // NOLINT(readability-function-cognitive-complexity)
140140
: "is not being listened on",
141141
CONNECT_RETRY_PAUSE);
142142
int ret = usleep(CONNECT_RETRY_PAUSE * 1000); // NOLINT
143-
if (ret == 0) {
143+
if (ret == 0 || errno == EINTR) {
144144
goto try_again;
145145
} else {
146146
mlog_err(dd_log_warning,

0 commit comments

Comments
 (0)