mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-14 13:21:54 -08:00
Sockets must be closed using closesocket in Windows
This commit is contained in:
parent
4fc8b4e5f8
commit
fdfe31a38c
1 changed files with 4 additions and 0 deletions
|
|
@ -137,7 +137,11 @@ int connect_to_server(char *host, int port)
|
|||
#endif
|
||||
start_critical_section();
|
||||
if (connect(fd, addr, addrlen) == -1) {
|
||||
#if defined(_MSC_VER) || defined(mingw32)
|
||||
closesocket(fd);
|
||||
#else
|
||||
(void) close (fd);
|
||||
#endif
|
||||
end_critical_section();
|
||||
return(0); /* errno set by system call. */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue