Add error messages when deser fails
This commit is contained in:
1 file changed
+9
-1
@@ -55,7 +55,15 @@ impl BcConnection {
|
||||
|
||||
let rx_thread = std::thread::spawn(move || {
|
||||
let mut context = BcContext::new();
|
||||
while BcConnection::poll(&mut context, &conn, &mut subs).is_ok() {}
|
||||
while {
|
||||
match BcConnection::poll(&mut context, &conn, &mut subs) {
|
||||
Ok(_) => true,
|
||||
Err(err) => {
|
||||
error!("Deserialization error: {}", err);
|
||||
false
|
||||
}
|
||||
}
|
||||
} {}
|
||||
});
|
||||
|
||||
Ok(BcConnection {
|
||||
|
||||
Reference in new issue
Block a user