]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
Add a poll flag for one-shot callbacks in AsyncSocket
authorOliver Kurth <okurth@vmware.com>
Mon, 23 Oct 2017 21:21:22 +0000 (14:21 -0700)
committerOliver Kurth <okurth@vmware.com>
Mon, 23 Oct 2017 21:21:22 +0000 (14:21 -0700)
commitd2c18c44df3fbc410e04b2f1b2595a326a52afec
tree681c16dca081f039e695e1df33276db167c1a78d
parent485dc67e56ad68e05d4106059594279f67dd119b
Add a poll flag for one-shot callbacks in AsyncSocket

The original change had an issue.  When the read and write callbacks
fire in parallel, both would release the reference to the SharedStream,
triggering its destructor.  Later when the read callback tried to
re-register itself, it would hit a boost exception.  To avoid that,
delay the reset of CallbackFD::stream to the end of Invoke so that the
SharedStream object will not be destroyed as long as the callback is
re-registered.
open-vm-tools/lib/asyncsocket/asyncsocket.c