handler-id
This commit is contained in:
@@ -28,6 +28,8 @@ async fn connect_handler(
|
||||
req: HttpRequest,
|
||||
state: web::Data<AppState>,
|
||||
) -> Result<HttpResponse, actix_web::Error> {
|
||||
let handler_id: u64 = rand::random();
|
||||
|
||||
let token = match req.headers().get("Authorization") {
|
||||
Some(val) => val.to_str().unwrap_or("").split(" ").last().unwrap_or(""),
|
||||
None => match req.match_info().get("token") {
|
||||
@@ -112,7 +114,7 @@ async fn connect_handler(
|
||||
});
|
||||
break;
|
||||
} else {
|
||||
println!("[handler] message handled {}", message_str);
|
||||
println!("[handler {}] message handled {}", handler_id, message_str);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user