Delay marking camera as connected until we've logged in

The reason for this change is that a "not responding" camera proxy such
as a ^Z'd `socat` instance will connect just fine, but never send any
data. In such a case, we retry in a 1-second loop, which is not the
intent of the retry loop.
This commit is contained in:
George Hilliard committed 2020-06-13 18:17:34 -05:00
1 parent bfa1fdf3b3
commit 01d60b336e
1 file changed
+2 -2
+2 -2
View File
@@ -105,10 +105,10 @@ fn camera_main(camera_config: &CameraConfig, output: &mut dyn Write) -> Result<N
);
camera.connect()?;
connected = true;
camera.login(&camera_config.username, camera_config.password.as_deref())?;
connected = true;
println!(
"{}: Connected to camera, starting video stream",
camera_config.name