mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
tcpserversrc: close the server socket after accepting a connection
g_socket_accept() is only called once for a server socket. So keeping the socket open ist just confusing possible clients. https://bugzilla.gnome.org/show_bug.cgi?id=731566
This commit is contained in:
parent
79cf59b7dd
commit
5ebfe5b26b
1 changed files with 6 additions and 0 deletions
|
@ -195,6 +195,12 @@ gst_tcp_server_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
|
|||
g_socket_accept (src->server_socket, src->cancellable, &err);
|
||||
if (!src->client_socket)
|
||||
goto accept_error;
|
||||
GST_DEBUG_OBJECT (src, "closing server socket");
|
||||
|
||||
if (!g_socket_close (src->server_socket, &err)) {
|
||||
GST_ERROR_OBJECT (src, "Failed to close socket: %s", err->message);
|
||||
g_clear_error (&err);
|
||||
}
|
||||
/* now read from the socket. */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue