diff options
| -rw-r--r-- | lib-src/emacsclient.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index bede01aaa0b..af7c10cac7d 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -390,8 +390,11 @@ void __cdecl close_winsock () void initialize_sockets () { + static done = FALSE; WSADATA wsaData; + if (done) return; + /* Initialize the WinSock2 library. */ if (WSAStartup (MAKEWORD (2, 0), &wsaData)) { @@ -400,6 +403,7 @@ void initialize_sockets () } atexit (close_winsock); + done = TRUE; } #endif /* WINDOWSNT */ |
