mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Respond to the connect
message from a devtools client (#35745)
* Respond to the "connect" message Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Bump log levels in devtools implementation a bit If everything is "debug" then nothing stands out. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
aa26aa1963
commit
e7e8ccea20
3 changed files with 20 additions and 12 deletions
|
@ -10,7 +10,7 @@ use std::net::TcpStream;
|
|||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use base::cross_process_instant::CrossProcessInstant;
|
||||
use log::{debug, warn};
|
||||
use log::debug;
|
||||
use serde_json::{Map, Value};
|
||||
|
||||
/// General actor system infrastructure.
|
||||
|
@ -175,21 +175,22 @@ impl ActorRegistry {
|
|||
let to = match msg.get("to") {
|
||||
Some(to) => to.as_str().unwrap(),
|
||||
None => {
|
||||
warn!("Received unexpected message: {:?}", msg);
|
||||
log::warn!("Received unexpected message: {:?}", msg);
|
||||
return Err(());
|
||||
},
|
||||
};
|
||||
|
||||
match self.actors.get(to) {
|
||||
None => debug!("message received for unknown actor \"{}\"", to),
|
||||
None => log::warn!("message received for unknown actor \"{}\"", to),
|
||||
Some(actor) => {
|
||||
let msg_type = msg.get("type").unwrap().as_str().unwrap();
|
||||
if actor.handle_message(self, msg_type, msg, stream, id)? !=
|
||||
ActorMessageStatus::Processed
|
||||
{
|
||||
debug!(
|
||||
log::warn!(
|
||||
"unexpected message type \"{}\" found for actor \"{}\"",
|
||||
msg_type, to
|
||||
msg_type,
|
||||
to
|
||||
);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue