1
1

enh: do not fail when new connection is refused during a running test (#1138)

Fixes #1135.
Этот коммит содержится в:
David Bar-On 2021-04-14 00:19:00 +03:00 коммит произвёл GitHub
родитель 8464c3c2bc
Коммит 27695dc4d7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

@ -150,10 +150,15 @@ iperf_accept(struct iperf_test *test)
/*
* Don't try to read from the socket. It could block an ongoing test.
* Just send ACCESS_DENIED.
* Also, if sending failed, don't return an error, as the request is not related
* to the ongoing test, and returning an error will terminate the test.
*/
if (Nwrite(s, (char*) &rbuf, sizeof(rbuf), Ptcp) < 0) {
i_errno = IESENDMESSAGE;
return -1;
if (test->debug)
printf("failed to send ACCESS_DENIED to an unsolicited connection requist during active test\n");
} else {
if (test->debug)
printf("successfully sent ACCESS_DENIED to an unsolicited connection requist during active test\n");
}
close(s);
}