mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 02:05:30 +00:00
aquatic_ws: add ErrorResponse, send it when info hash is not allowed
This commit is contained in:
parent
28cc6c261a
commit
1d5eb0dff9
5 changed files with 43 additions and 4 deletions
|
|
@ -151,6 +151,16 @@ impl Connection {
|
|||
|
||||
self.can_send = true;
|
||||
}
|
||||
Ok(OutMessage::ErrorResponse(response)) => {
|
||||
state
|
||||
.statistics
|
||||
.responses_error
|
||||
.fetch_add(1, Ordering::SeqCst);
|
||||
|
||||
eprintln!("received error response: {:?}", response.failure_reason);
|
||||
|
||||
self.can_send = true;
|
||||
},
|
||||
Err(err) => {
|
||||
eprintln!("error deserializing offer: {:?}", err);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue