io.sockets.windows: win32-socket instances were not being unregistered from global disposables hash; also check return value of closesocket
parent
f36d351012
commit
cbb9ff61fb
|
@ -30,9 +30,9 @@ TUPLE: win32-file < win32-handle ptr ;
|
|||
win32-file new-win32-handle ;
|
||||
|
||||
M: win32-file dispose
|
||||
dup disposed>> [ drop ] [
|
||||
[ cancel-operation ] [ call-next-method ] bi
|
||||
] if ;
|
||||
[ dup disposed>> [ drop ] [ cancel-operation ] if ]
|
||||
[ call-next-method ]
|
||||
bi ;
|
||||
|
||||
HOOK: CreateFile-flags io-backend ( DWORD -- DWORD )
|
||||
HOOK: FileArgs-overlapped io-backend ( port -- overlapped/f )
|
||||
|
|
|
@ -30,8 +30,8 @@ TUPLE: win32-socket < win32-file ;
|
|||
: <win32-socket> ( handle -- win32-socket )
|
||||
win32-socket new-win32-handle ;
|
||||
|
||||
M: win32-socket dispose ( stream -- )
|
||||
handle>> closesocket drop ;
|
||||
M: win32-socket dispose* ( stream -- )
|
||||
handle>> closesocket socket-error* ;
|
||||
|
||||
: unspecific-sockaddr/size ( addrspec -- sockaddr len )
|
||||
[ empty-sockaddr/size ] [ protocol-family ] bi pick family<< ;
|
||||
|
|
Loading…
Reference in New Issue