GBufferedOutputStream "outstanding operation"



Hello everyone,

I'm trying to use GBufferedOutputStream for a simple server. The code is
here¹. Basically I call:
 g_output_stream_write(client->output, data, count, NULL, NULL);

to write to the buffered output stream expecting this call won't fail or
block. Then I call:
 g_output_stream_flush_async(client->output, G_PRIORITY_DEFAULT, NULL,
                             event_flush, GINT_TO_POINTER(client->id))

to flush the write when the operation is over.

Every now and then the g_output_stream_flush_finish() function in
event_flush() returns error with the message:
 "Stream has outstanding operation"

Tbh, I don't really understand what this message really means.
Can someone explain to me what it means and give me pointers to solve
the problem?

Thanks in advance.

¹: http://github.com/alip/mpdcron/blob/master/src/gmodule/stats/stats-server.c

-- 
Regards,
Ali Polatel

Attachment: pgp2e4e9SH20g.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]