mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
tests: Explicitly close stream in converter-stream
When the test has finished writing all the expanded content into the socket, explicitly close the output stream, which should make the input stream readable and non-blocking. The code intended to do this before, but only as a side-effect of dropping its last reference to `right`. If another reference was being held to `right` somewhere else, it wouldn’t end up being closed, which would lead to failures like https://gitlab.gnome.org/GNOME/glib/-/jobs/1890000: ``` (/var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/_build/gio/tests/converter-stream:56570): GLib-GIO-DEBUG: 12:56:23.280: GSocketClient: Connection successful! Bail out! GLib-GIO:ERROR:../gio/tests/converter-stream.c:1042:test_converter_pollable: assertion failed (error == NULL): Resource temporarily unavailable (g-io-error-quark, 27) stderr: ``` This is a bit of a guess (I’m not sure it’ll fix the intermittent test error, as I haven’t been able to reproduce that locally), but it’s worth a try. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
dbe34687d0
commit
96caca2b7a
@ -1017,6 +1017,7 @@ test_converter_pollable (void)
|
||||
}
|
||||
else if (socket_out)
|
||||
{
|
||||
g_output_stream_close (socket_out, NULL, NULL);
|
||||
g_object_unref (right);
|
||||
socket_out = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user