After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724278 - gsocketconnection: Document closing connections with g_io_stream_close()
gsocketconnection: Document closing connections with g_io_stream_close()
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-02-13 11:00 UTC by Philip Withnall
Modified: 2014-02-13 14:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsocketconnection: Document closing connections with g_io_stream_close() (2.14 KB, patch)
2014-02-13 11:00 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-02-13 11:00:12 UTC
Patch attached.
Comment 1 Philip Withnall 2014-02-13 11:00:14 UTC
Created attachment 268995 [details] [review]
gsocketconnection: Document closing connections with g_io_stream_close()

It’s not enough to close a connection by calling g_input_stream_close()
and g_output_stream_close() on its two substreams: to close the
underlying socket, one must use g_io_stream_close(). Document that.
Comment 2 Dan Winship 2014-02-13 13:33:59 UTC
Comment on attachment 268995 [details] [review]
gsocketconnection: Document closing connections with g_io_stream_close()

I think the gsocketconnection.c addition is fine, but the giostream.c addition breaks up the flow of the paragraph. (The "However" part at the end seems out of place now.) And I don't think it's really necessary anyway. So I'd just leave that part out.
Comment 3 Philip Withnall 2014-02-13 14:11:02 UTC
I removed the ‘for example’ sentence from the GIOStream docs and pushed. I think that keeps the flow, while clarifying that closing both substreams really doesn’t do what you might expect.

Attachment 268995 [details] pushed as 169846c - gsocketconnection: Document closing connections with g_io_stream_close()