diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df40ebd..074634a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-2019] runs-on: ${{ matrix.os }} steps: diff --git a/remote_send/src/mqtt_server.rs b/remote_send/src/mqtt_server.rs index 44cac5b..ad1593b 100644 --- a/remote_send/src/mqtt_server.rs +++ b/remote_send/src/mqtt_server.rs @@ -187,21 +187,19 @@ impl Mqtt { ), id: client.machine_id.to_owned(), }; - let data = serde_json::to_vec(&data).unwrap(); + let data = serde_json::to_vec(&data)?; let server = self.server.upgrade().unwrap(); - server - .send_packet( - client_id, - PublishPacket { - flags: PublishFlags::QOS1, - topic: format!("/sdcp/request/{}", client.attributes.mainboard_id), - packet_id: Some(packet_id), - data, - } - .to_packet(), - ) - .unwrap(); + server.send_packet( + client_id, + PublishPacket { + flags: PublishFlags::QOS1, + topic: format!("/sdcp/request/{}", client.attributes.mainboard_id), + packet_id: Some(packet_id), + data, + } + .to_packet(), + )?; Ok(()) }