Updating session and capture device to be compatible with new discarding logic and hasExistingSession variable.
Checking and setting hasExistingSession in stopScanning