diff --git a/backend/src/device_storage.rs b/backend/src/device_storage.rs --- a/backend/src/device_storage.rs +++ b/backend/src/device_storage.rs @@ -1,6 +1,6 @@ use std::{collections::HashMap, ops::Not, path::PathBuf, sync::Arc}; -use color_eyre::eyre::Result; +use color_eyre::eyre::{Result, eyre}; use serde::{Deserialize, Serialize}; use tokio::{fs, sync::RwLock}; diff --git a/backend/src/tcp/registration.rs b/backend/src/tcp/registration.rs --- a/backend/src/tcp/registration.rs +++ b/backend/src/tcp/registration.rs @@ -49,7 +49,6 @@ id, registration ); - Packet::send(socket, buf, Packet::Ok).await?; handle_registration(state.clone(), socket, id, registration).await?; } _ => { @@ -67,8 +66,9 @@ device: Device, ) -> eyre::Result<()> { let new_device = state.device_storage.update_or_insert(id, device).await?; - let mut buf = [0u8; 4096]; + + Packet::send(socket, &mut buf, Packet::Ok).await?; match new_device.mode { Mode::Color => {