Add a generic Ack message, use it instead of Pong
Remove the `id` field from `Ping`, because it isn't used. There is already an id on the message envelope.
This commit is contained in:
+1
-8
@@ -246,14 +246,7 @@ impl Server {
|
||||
}
|
||||
|
||||
async fn ping(self: Arc<Server>, request: TypedEnvelope<proto::Ping>) -> tide::Result<()> {
|
||||
self.peer
|
||||
.respond(
|
||||
request.receipt(),
|
||||
proto::Pong {
|
||||
id: request.payload.id,
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
self.peer.respond(request.receipt(), proto::Ack {}).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user