Skip to content

Commit

Permalink
Merge pull request #28 from noctisynth/release/2.1.1
Browse files Browse the repository at this point in the history
release: 2.1.1
  • Loading branch information
fu050409 committed Jun 26, 2024
2 parents da23803 + 8d4c1dc commit f2e7ea7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion oblivion/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oblivion"
version = "2.1.0"
version = "2.1.1"
authors = ["苏向夜 <fu050409@163.com>"]
description = "Rust High Concurrency Implementation of Oblivion, an End-to-End Encryption Protocol Based on ECDHE Encryption Algorithm"
license = "AGPL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion oblivion/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use oblivion::path_route;
use oblivion::types::server;
use oblivion_codegen::async_route;
use serde_json::json;
use tokio::time::Instant;
use std::env::args;
use tokio::time::Instant;

#[async_route]
fn handler(_sess: Session) -> server::Result {
Expand Down
29 changes: 13 additions & 16 deletions oblivion/src/models/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,19 @@ pub async fn handle(router: Arc<Router>, stream: TcpStream, peer: SocketAddr) {
let now = Instant::now();
#[cfg(feature = "perf")]
println!("=================");
match _handle(&router, stream, peer).await {
Ok(()) => {}
Err(error) => {
eprintln!(
"{} <-> [{}] \"{}\" {}",
peer.ip().to_string().cyan(),
Local::now().format("%d/%m/%Y %H:%M:%S"),
"CONNECT - Oblivion/2.0".yellow(),
"501".red()
);
eprintln!("{}", error.to_string().bright_red());
#[cfg(feature = "bench")]
{
eprintln!("An error occurred in handling runtime unexpectedly.");
process::exit(1);
}
if let Err(error) = _handle(&router, stream, peer).await {
eprintln!(
"{} <-> [{}] \"{}\" {}",
peer.ip().to_string().cyan(),
Local::now().format("%d/%m/%Y %H:%M:%S"),
"CONNECT - Oblivion/2.0".yellow(),
"501".red()
);
eprintln!("{}", error.to_string().bright_red());
#[cfg(feature = "bench")]
{
eprintln!("An error occurred in handling runtime unexpectedly.");
process::exit(1);
}
}
#[cfg(feature = "perf")]
Expand Down

0 comments on commit f2e7ea7

Please sign in to comment.