[Live-devel] RTSP server socket bind error

Stathis Voukelatos stathis.voukelatos at aircraftmedical.com
Thu Jul 21 01:59:35 PDT 2011


Hi,

 

I run the 'testH264VideoStreamer' app and view the video with an RTSP
client (eg VLC).

If I kill 'testH264VideoStreamer' while the client is connected and then
try to run it again

straight away I get the following error:

 

     Failed to create RTSP server: bind() error (port number: 8554):
Address already in use

 

I ran netstat and found that the cause of this error is that the socket
is in the TIME_WAIT

state. You need to wait until the TIME_WAIT timeout period elapses.

I found a way around this by editing the setupStreamSocket() function to
set the

SO_LINGER option with a timeout of 0 on the socket to force the server
to abort the

connection. Would that be a useful change to the code (maybe with a
linger timeout > 0 ) 

or would it cause other side effects?

 

Stathis

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20110721/2f39a308/attachment-0001.html>


More information about the live-devel mailing list