1
1

Closing server prot_listener socket after stream setup failure (#1084)

Making sure the server closes prot_listener socket at the end of a session with a client. Without this change the socket may remain open, for example when there is a failure during the UDP stream establishment because the --window value is too high. Closing the socket was added to cleanup_server() as it seems to handle all cases where the socket may remain open.
Этот коммит содержится в:
David Bar-On 2020-12-04 18:19:08 +02:00 коммит произвёл GitHub
родитель d3049a60fe
Коммит 50315e7a1e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

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

@ -377,6 +377,9 @@ cleanup_server(struct iperf_test *test)
if (test->listener) {
close(test->listener);
}
if (test->prot_listener > -1) { // May remain open if create socket failed
close(test->prot_listener);
}
/* Cancel any remaining timers. */
if (test->stats_timer != NULL) {