@@ -259,6 +259,7 @@ async fn ws_handler(
259259 ws. on_upgrade ( move |socket| handle_socket ( socket, addr, state, auth_session) )
260260}
261261
262+ // ! Camera restart does not guarantee new recording, frames will keep going to the same video unless socket times out?
262263// TODO: Find out if ECONNRESET after a while of no messages only affects vite dev server or if it is a general issue
263264// ? Using tick await for empty tasks might not be the best idea
264265/// Actual websocket statemachine (one will be spawned per connection)
@@ -376,6 +377,7 @@ async fn handle_socket(
376377 // TODO: Handle stopping recording properly
377378 // TODO: Inform client/db if recording fails
378379 // TODO: Find out which is better, ingesting encoded or decoded images
380+ // ! Camera restart does not guarantee new recording, frames will keep going to the same video unless socket times out?
379381 let mut recording_task: JoinHandle < Result < ( ) , Box < dyn std:: error:: Error + Send + Sync > > > =
380382 if is_camera {
381383 // TODO: Check if errors are returned properly here, had some issues with the ? operator being silent
@@ -428,6 +430,8 @@ async fn handle_socket(
428430
429431 let mut first_received = false ;
430432 // TODO: Adding a sleep might be a good idea?
433+ // ! Camera restart does not guarantee new recording, frames will keep going to the same video unless socket times out?
434+ // TODO: Handle if user changes resolution/framerate during recording (this is likely to happen)
431435 loop {
432436 // TODO: this might not be the best way of doing this
433437 let message = ( * images_rx_rec. borrow_and_update ( ) ) . clone ( ) ;
0 commit comments