]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
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)
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.


No differences found