|
|
|
@ -617,6 +617,8 @@ impl TMClient {
|
|
|
|
|
let data = incoming[0..read].to_vec();
|
|
|
|
|
match BackendPacket::from_bytes(data) {
|
|
|
|
|
Some(packet) => {
|
|
|
|
|
let offset = packet.timestamp - get_float_time();
|
|
|
|
|
self.time_offset = offset.clone();
|
|
|
|
|
self.last_seq_num = packet.seq_num;
|
|
|
|
|
match packet.msg_type {
|
|
|
|
|
// Notice Message
|
|
|
|
@ -643,11 +645,6 @@ impl TMClient {
|
|
|
|
|
match BackendMessage::from_bytes(packet.data.clone()) {
|
|
|
|
|
Some(message) => {
|
|
|
|
|
log::debug!("Received response: {:#?}", message);
|
|
|
|
|
let offset = packet.timestamp - get_float_time();
|
|
|
|
|
self.time_offset = offset.clone();
|
|
|
|
|
log::info!("New offset: {}", offset);
|
|
|
|
|
log::info!("Server Timetamp: {}", packet.timestamp);
|
|
|
|
|
log::info!("Local Timetamp: {}", get_float_time());
|
|
|
|
|
|
|
|
|
|
match self.responses.send((Box::new(message), offset)) {
|
|
|
|
|
Ok(_) => log::debug!("Forwarded response to callback engine"),
|
|
|
|
|