Close the socket event in finalizer instead of in close method
authorThomas Kristensen <thomas.k.kristensen@tandberg.com>
Sun, 14 Mar 2010 09:47:17 +0000 (11:47 +0200)
committerTor Lillqvist <tml@iki.fi>
Sun, 14 Mar 2010 09:51:24 +0000 (11:51 +0200)
commit1be8ad35144d34de99b6153cbbfa8f9add46888b
tree763faf9cfb9f89a033e89ea0008e37d6613a1553
parent6c5d2798f600a0536306e1c67b2e26e2c6eff006
Close the socket event in finalizer instead of in close method

There might be a GSource attached to a GMainContext, about to be removed by a
pending cancellation. Deleting the handle too early will trigger a g_warning in
the "select()" call in GMainContext. Attached patch fixes this by deferring
destruction of WSAEVENT object until GSocket's finalize().

Patch from bug #612702.

Signed-off-by: Tor Lillqvist <tml@iki.fi>
gio/gsocket.c