Commit 5ebfe5b2 authored by Michael Olbrich's avatar Michael Olbrich Committed by Tim-Philipp Müller
Browse files

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.
parent 79cf59b7
......@@ -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. */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment