mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
silentize connection close results (todo)
This commit is contained in:
parent
366b5b89ca
commit
2738bd8f3e
1 changed files with 7 additions and 7 deletions
|
|
@ -436,7 +436,7 @@ impl Page {
|
||||||
gemini::client::response::meta::Status::Input |
|
gemini::client::response::meta::Status::Input |
|
||||||
gemini::client::response::meta::Status::SensitiveInput => {
|
gemini::client::response::meta::Status::SensitiveInput => {
|
||||||
// Close connection
|
// Close connection
|
||||||
response.connection.close();
|
let _ = response.connection.close();
|
||||||
|
|
||||||
// Format response
|
// Format response
|
||||||
let status = Status::Input;
|
let status = Status::Input;
|
||||||
|
|
@ -495,7 +495,7 @@ impl Page {
|
||||||
match result {
|
match result {
|
||||||
Ok(buffer) => {
|
Ok(buffer) => {
|
||||||
// Close connection
|
// Close connection
|
||||||
response.connection.close();
|
let _ = response.connection.close();
|
||||||
|
|
||||||
// Set children component
|
// Set children component
|
||||||
let text_gemini = content.to_text_gemini(
|
let text_gemini = content.to_text_gemini(
|
||||||
|
|
@ -578,7 +578,7 @@ impl Page {
|
||||||
Some(&cancellable),
|
Some(&cancellable),
|
||||||
move |result| {
|
move |result| {
|
||||||
// Close connection
|
// Close connection
|
||||||
response.connection.close();
|
let _ = response.connection.close();
|
||||||
|
|
||||||
// Process buffer data
|
// Process buffer data
|
||||||
match result {
|
match result {
|
||||||
|
|
@ -634,7 +634,7 @@ impl Page {
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
// Close connection
|
// Close connection
|
||||||
response.connection.close();
|
let _ = response.connection.close();
|
||||||
|
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
|
|
@ -661,7 +661,7 @@ impl Page {
|
||||||
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-31-permanent-redirection
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-31-permanent-redirection
|
||||||
gemini::client::response::meta::Status::PermanentRedirect => {
|
gemini::client::response::meta::Status::PermanentRedirect => {
|
||||||
// Close connection
|
// Close connection
|
||||||
response.connection.close();
|
let _ = response.connection.close();
|
||||||
|
|
||||||
// Extract redirection URL from response data
|
// Extract redirection URL from response data
|
||||||
match response.meta.data {
|
match response.meta.data {
|
||||||
|
|
@ -777,7 +777,7 @@ impl Page {
|
||||||
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-62-certificate-not-valid
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-62-certificate-not-valid
|
||||||
gemini::client::response::meta::Status::CertificateInvalid => {
|
gemini::client::response::meta::Status::CertificateInvalid => {
|
||||||
// Close connection
|
// Close connection
|
||||||
response.connection.close();
|
let _ = response.connection.close();
|
||||||
|
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Success;
|
let status = Status::Success;
|
||||||
|
|
@ -810,7 +810,7 @@ impl Page {
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
// Close connection
|
// Close connection
|
||||||
response.connection.close();
|
let _ = response.connection.close();
|
||||||
|
|
||||||
// Define common data
|
// Define common data
|
||||||
let status = Status::Failure;
|
let status = Status::Failure;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue