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.
Этот коммит содержится в:
родитель
d3049a60fe
Коммит
50315e7a1e
@ -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) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user