socket: WSACleanup should not be called on socket close

pull/1484/head
Vitaly Takmazov 2019-08-05 13:26:10 +03:00 committed by Alexander Medvednikov
parent 3f3b7665ca
commit 43b81688f6
1 changed files with 0 additions and 5 deletions

View File

@ -227,11 +227,6 @@ pub fn (s Socket) recv(bufsize int) byteptr {
// shutdown and close socket // shutdown and close socket
pub fn (s Socket) close() ?int { pub fn (s Socket) close() ?int {
// WinSock
$if windows {
C.WSACleanup()
}
mut shutdown_res := 0 mut shutdown_res := 0
$if windows { $if windows {
shutdown_res = C.shutdown(s.sockfd, SD_BOTH) shutdown_res = C.shutdown(s.sockfd, SD_BOTH)