From 2703423b72d9d8f5ac4bef87ae784680fa096f94 Mon Sep 17 00:00:00 2001 From: Michael Black Date: Thu, 19 Dec 2019 18:03:02 -0600 Subject: [PATCH] Think I got the fd socket leak on windows fixed now --- tests/rigctld.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/rigctld.c b/tests/rigctld.c index 41ebe44d3..22163aa5c 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1036,12 +1036,16 @@ void *handle_socket(void *arg) if (retcode != 0) { rig_debug(RIG_DEBUG_ERR, "%s: fclose(fsockin) %s\n", __func__, strerror(retcode)); } +#ifndef __MINGW32__ + rig_debug(RIG_DEBUG_ERR,"%s: fclose(fsockout)\n", __func__); retcode = fclose(fsockout); if (retcode != 0) { rig_debug(RIG_DEBUG_ERR, "%s: fclose(fsockout) %s\n", __func__, strerror(retcode)); } +#endif handle_exit: #ifdef __MINGW32__ + shutdown(handle_data_arg->sock, 2) closesocket(handle_data_arg->sock); #else close(handle_data_arg->sock);