[Bug 785684] rtspconnection: add API to send messages without blocking

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Oct 12 07:51:04 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=785684

--- Comment #15 from Jonathan Karlsson <jonathan.karlsson at axis.com> ---
Created attachment 361405
  --> https://bugzilla.gnome.org/attachment.cgi?id=361405&action=edit
Test to show difference between block and non-block

Hi,
Sorry for the late response. I now have had time to test a bit.
I was not sure at first if the blocking issue was only based on assumption or
not. However I found in the gio code, like you said, that it was setting the
socket to non-blocking with g_unix_set_fd_nonblocking in g_socket_constructed.

So I was under the assumption that it was non-blocking during the time I was
testing. In the test case I am writing to a socket until it gets full. Then it
hangs in g_socket_condition_timed_wait (in block_on_timeout, called from
g_socket_send_message).
However, when I then explicitly set the socket to non-blocking before calling
send_message, the call does not hang anymore but instead return an EWOULDBLOCK
with a message "Error sending message: Resource temporarily unavailable".

So this shows that the sockets created from GSocketConnection in the test cases
are not put into non-blocking mode?

PS. sorry for the long buffer in the test case.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list