Skip to content

Commit d0bba03

Browse files
committed
suggestion for doc from vdukhovni.
1 parent 72729e4 commit d0bba03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Network/Socket/Types.hsc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ withFdSocket (Socket ref _) f = do
168168
return r
169169

170170
-- | Socket is closed and a duplicated file descriptor is returned.
171+
-- The duplicated descriptor is no longer subject to the possibility
172+
-- of unexpectedly being closed if the socket is finalized. It is
173+
-- now the caller's responsibility to ultimately close the
174+
-- duplicated file descriptor.
171175
socketToFd :: Socket -> IO CInt
172176
socketToFd s = do
173177
fd <- unsafeFdSocket s

0 commit comments

Comments
 (0)