]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Implement deferred closing of Windows handle-sockets.
authorSimon Tatham <anakin@pobox.com>
Thu, 16 Feb 2017 20:26:58 +0000 (20:26 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 17 Feb 2017 08:40:57 +0000 (08:40 +0000)
commit92d855d0fe9b327f3881170d7663bcc5ec8f8d20
treed300c5c2e62e26e43c926b950ac240c08bac2199
parent8d48caa849907d6737fbdaee5fc49907beb899c2
Implement deferred closing of Windows handle-sockets.

When a handle socket is in THAWING state and handle_socket_unfreeze is
gradually passing the backlogged data on to the plug, the plug might
suddenly turn round and close the socket in the course of handling
plug_receive(), which means that handle_socket_unfreeze had better be
careful not to have had everything vanish out from under it when that
call returns. To solve this, I've added a 'deferred close' flag which
handle_socket_unfreeze can set around its call to plug_receive, and
handle_socket_close will detect that and not actually free the socket,
instead leaving that for handle_socket_unfreeze to do under its own
control.
windows/winhsock.c