Camera disconnection/connection handling

How to handle if the camera disconnects while receiving video and reconnects after some time?
Should this be done in the driver or in the application?

hello all dear,
There is no one to answer?!

when the camera is disconnected the board return timeout, when connected, we must be stop the stream and then start the stream. how to handle that without stop and then start stream?