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 688535 - write/poll on closed sockets after handling a TEARDOWN request
write/poll on closed sockets after handling a TEARDOWN request
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Mac OS
: Normal normal
: 1.2.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-17 14:01 UTC by Alessandro Decina
Modified: 2014-02-25 22:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (6.47 KB, application/octet-stream)
2012-11-17 14:01 UTC, Alessandro Decina
Details

Description Alessandro Decina 2012-11-17 14:01:42 UTC
Created attachment 229238 [details]
fix

As discussed on IRC, we currently send the TEARDOWN response and immediately close the client connection without waiting that the response has been written to the client. This can lead to writing/polling on closed sockets, which can causes SIGPIPE or poll() to fail.

The attached patch fixes this issue.
Comment 1 Wim Taymans 2012-11-20 08:33:00 UTC
commit 65042a9551a9cf4586d6e3fa49e6a10f25873553
Author: Alessandro Decina <alessandro.d@gmail.com>
Date:   Sat Nov 17 14:51:52 2012 +0100

    client: wait until the TEARDOWN response is sent to close the connection
    
    Responses can be sent async so we need to wait until the TEARDOWN response has
    been written before we close the connection to the client. This avoids the risk
    of writing/polling closed sockets.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=688535