socket: WSACleanup should not be called on socket close
parent
3f3b7665ca
commit
43b81688f6
|
@ -227,11 +227,6 @@ pub fn (s Socket) recv(bufsize int) byteptr {
|
|||
|
||||
// shutdown and close socket
|
||||
pub fn (s Socket) close() ?int {
|
||||
// WinSock
|
||||
$if windows {
|
||||
C.WSACleanup()
|
||||
}
|
||||
|
||||
mut shutdown_res := 0
|
||||
$if windows {
|
||||
shutdown_res = C.shutdown(s.sockfd, SD_BOTH)
|
||||
|
|
Loading…
Reference in New Issue