소스 검색

Update tokio and add else {} branch

Cesar Rodas 2 년 전
부모
커밋
e1d000a9ca
3개의 변경된 파일12개의 추가작업 그리고 10개의 파일을 삭제
  1. 8 8
      Cargo.lock
  2. 1 1
      Cargo.toml
  3. 3 1
      src/server.rs

+ 8 - 8
Cargo.lock

@@ -348,7 +348,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
 dependencies = [
 dependencies = [
  "proc-macro2",
  "proc-macro2",
  "quote",
  "quote",
- "syn 2.0.20",
+ "syn 2.0.22",
 ]
 ]
 
 
 [[package]]
 [[package]]
@@ -774,9 +774,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
 
 
 [[package]]
 [[package]]
 name = "proc-macro2"
 name = "proc-macro2"
-version = "1.0.61"
+version = "1.0.62"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "363a6f739a0c0addeaf6ed75150b95743aa18643a3c6f40409ed7b6db3a6911f"
+checksum = "fe8df9bd9fe9d1742a9e17f8129712801b428f6d4c6059d79bacea58f0b0142d"
 dependencies = [
 dependencies = [
  "unicode-ident",
  "unicode-ident",
 ]
 ]
@@ -941,7 +941,7 @@ checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
 dependencies = [
 dependencies = [
  "proc-macro2",
  "proc-macro2",
  "quote",
  "quote",
- "syn 2.0.20",
+ "syn 2.0.22",
 ]
 ]
 
 
 [[package]]
 [[package]]
@@ -1068,9 +1068,9 @@ dependencies = [
 
 
 [[package]]
 [[package]]
 name = "syn"
 name = "syn"
-version = "2.0.20"
+version = "2.0.22"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fcb8d4cebc40aa517dfb69618fa647a346562e67228e2236ae0042ee6ac14775"
+checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616"
 dependencies = [
 dependencies = [
  "proc-macro2",
  "proc-macro2",
  "quote",
  "quote",
@@ -1105,7 +1105,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
 dependencies = [
 dependencies = [
  "proc-macro2",
  "proc-macro2",
  "quote",
  "quote",
- "syn 2.0.20",
+ "syn 2.0.22",
 ]
 ]
 
 
 [[package]]
 [[package]]
@@ -1154,7 +1154,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
 dependencies = [
 dependencies = [
  "proc-macro2",
  "proc-macro2",
  "quote",
  "quote",
- "syn 2.0.20",
+ "syn 2.0.22",
 ]
 ]
 
 
 [[package]]
 [[package]]

+ 1 - 1
Cargo.toml

@@ -11,7 +11,7 @@ bytes = "1.4"
 byteorder = "1.2.2"
 byteorder = "1.2.2"
 redis-zero-protocol-parser = "^0.3"
 redis-zero-protocol-parser = "^0.3"
 redis-config-parser = {path = "redis-config-parser"}
 redis-config-parser = {path = "redis-config-parser"}
-tokio={version="1", features = ["full", "tracing"] }
+tokio={version="1.26.0", features = ["full", "tracing"] }
 parking_lot="0.11.2"
 parking_lot="0.11.2"
 tokio-util={version="^0.6", features = ["full"] }
 tokio-util={version="^0.6", features = ["full"] }
 crc32fast="1.3.2"
 crc32fast="1.3.2"

+ 3 - 1
src/server.rs

@@ -218,7 +218,7 @@ async fn handle_new_connection<T: AsyncReadExt + AsyncWriteExt + Unpin, A: ToStr
                     }
                     }
                 }
                 }
                 buffered_commands.clear();
                 buffered_commands.clear();
-            }
+            },
             result = transport.next() => match result {
             result = transport.next() => match result {
                 Some(Ok(args)) => {
                 Some(Ok(args)) => {
                         if conn.is_blocked() {
                         if conn.is_blocked() {
@@ -240,6 +240,8 @@ async fn handle_new_connection<T: AsyncReadExt + AsyncWriteExt + Unpin, A: ToStr
                     break;
                     break;
                 },
                 },
                 None => break,
                 None => break,
+            },
+            else => {
             }
             }
         }
         }
     }
     }