server: use 5 second linger period in SO_LINGER

Wait 5 seconds before clearing the send buffers and reseting the connection with
the client when we do a close. This should be enough time to get the message to
the client.

See #622757
This commit is contained in:
Wim Taymans 2010-08-19 18:52:47 +02:00
parent 8f6fd32065
commit 2607ff079d

View file

@ -480,7 +480,7 @@ gst_rtsp_server_sink_init_send (GstRTSPServer * server)
/* make sure socket is reset immediately after close. This ensure that we can
* reuse the socket quickly. */
linger.l_onoff = 1;
linger.l_linger = 0;
linger.l_linger = 5;
if (setsockopt (server->server_sock.fd, SOL_SOCKET, SO_LINGER,
(void *) &linger, sizeof (linger)) < 0)
goto linger_failed;