Accommodate extension point

This commit is contained in:
Tony Garnock-Jones 2022-01-17 00:32:16 +01:00
parent c951cea508
commit 650463ff20
1 changed files with 6 additions and 1 deletions

View File

@ -303,12 +303,17 @@ impl TunnelRelay {
fn handle_inbound_packet(&mut self, t: &mut Activation, p: P::Packet<AnyValue>) -> ActorResult {
tracing::debug!(packet = ?p, "-->");
match p {
P::Packet::Extension(b) => {
let P::Extension { label, fields } = *b;
tracing::info!(?label, ?fields, "received Extension from peer");
Ok(())
}
P::Packet::Error(b) => {
tracing::info!(message = ?b.message.clone(),
detail = ?b.detail.clone(),
"received Error from peer");
Err(*b)
},
}
P::Packet::Turn(b) => {
let P::Turn(events) = *b;
for P::TurnEvent { oid, event } in events {