-
Simon McVittie authored
My previous fix for GNOME#662100 was incomplete: it seems that with some timings, the stream can be closed with an async read in-flight. This can make the read fail immediately with G_IO_ERROR_CLOSED instead of becoming cancelled. This happens reliably on an embedded device, and rarely on my laptop; repeating the test 100 times in quick succession reliably reproduces the bug on my laptop. It seems as though what we really want is to ignore read errors, once we've established that we want to close the connection anyway - this means that after asking to close, you're immune to exit-on-close, which seems like a good rule. An additional subtlety is that continuing to read after we know we want to close is still required, otherwise we'll never emit ::closed. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662100 Bug-NB: NB#287088 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Colin Walters <walters@verbum.org>
0f01bef4