ayufan / camera-streamer

High-performance low-latency camera streamer for Raspberry PI's
313 stars 47 forks source link

Unable to restart service if RTSP stream is active when service is stopped #122

Open kmusser2 opened 9 months ago

kmusser2 commented 9 months ago

If an RTSP stream is active when the service is stopped, camera-streamer leaves the socket in TIME_WAIT state. This prevents the service from restarting until the TIME_WAIT state is cleaned up by the OS. The systemctl attempts to restart the service repeatedly, but it will always fail until the TIME_WAIT clears.

The following is written to syslog: camera-streamer[3317]: output/rtsp/rtsp.cc: ?: Failed to create RTSP server: bind() error (port number: 8554): Address already in use