diff --git a/src/VideoStreaming/VideoReceiver.cc b/src/VideoStreaming/VideoReceiver.cc index aecd1fb914b9235a29fcbbd9af12d9f15987ad8b..1e567b0472a578d3d781830cc7441434de5c1a30 100644 --- a/src/VideoStreaming/VideoReceiver.cc +++ b/src/VideoStreaming/VideoReceiver.cc @@ -140,10 +140,9 @@ void VideoReceiver::_tcp_timeout() { //-- If socket is live, we got no connection nor a socket error - if(_socket) { - delete _socket; - _socket = nullptr; - } + delete _socket; + _socket = nullptr; + if(_videoSettings->streamEnabled()->rawValue().toBool()) { //-- RTSP will try to connect to the server. If it cannot connect, // it will simply give up and never try again. Instead, we keep