rtspconnection: needs locking mechanisms?
Submitted by Jonathan Karlsson
Link to original bug (#788549)
Description
Created attachment 360949
Test case to show the issue when closing the connection while writing to it
When looking into
https://bugzilla.gnome.org/show_bug.cgi?id=785684 and
https://bugzilla.gnome.org/show_bug.cgi?id=771525,
we noticed that if the rtspconnection gets closed by one thread while another thread is writing to it, there will be errors. We also noticed that no members of rtspconnection are protected by any locks. Is this intentional?
I have added a test case to show the situation where one thread is sending when the other one is closing.
Is this something we should handle when providing the patch for https://bugzilla.gnome.org/show_bug.cgi?id=785684? Maybe by adding locks, or handling the gst_rtsp_connection_close in some other way in the new write_vectors-method?
Patch 360949, "Test case to show the issue when closing the connection while writing to it":
0001-rtspconnection-Send-while-closing-connection.patch