Attempt to fix #190

This commit is contained in:
Nikolay Kim 2023-11-12 22:28:37 +06:00
parent 717dfd6fbb
commit 41045de766
4 changed files with 11 additions and 13 deletions

View file

@ -1,5 +1,9 @@
# Changes # Changes
## [0.3.3] - 2023-11-12
* Attempt to fix #190
## [0.3.2] - 2023-11-03 ## [0.3.2] - 2023-11-03
* Improve implementation * Improve implementation

View file

@ -1,6 +1,6 @@
[package] [package]
name = "ntex-tls" name = "ntex-tls"
version = "0.3.2" version = "0.3.3"
authors = ["ntex contributors <team@ntex.rs>"] authors = ["ntex contributors <team@ntex.rs>"]
description = "An implementation of SSL streams for ntex backed by OpenSSL" description = "An implementation of SSL streams for ntex backed by OpenSSL"
keywords = ["network", "framework", "async", "futures"] keywords = ["network", "framework", "async", "futures"]
@ -25,9 +25,9 @@ openssl = ["tls_openssl"]
rustls = ["tls_rust"] rustls = ["tls_rust"]
[dependencies] [dependencies]
ntex-bytes = "0.1.19" ntex-bytes = "0.1.21"
ntex-io = "0.3.5" ntex-io = "0.3.7"
ntex-util = "0.3.3" ntex-util = "0.3.4"
ntex-service = "1.2.7" ntex-service = "1.2.7"
log = "0.4" log = "0.4"
pin-project-lite = "0.2" pin-project-lite = "0.2"
@ -39,7 +39,7 @@ tls_openssl = { version = "0.10", package = "openssl", optional = true }
tls_rust = { version = "0.21", package = "rustls", optional = true } tls_rust = { version = "0.21", package = "rustls", optional = true }
[dev-dependencies] [dev-dependencies]
ntex = { version = "0.7.0", features = ["openssl", "rustls", "tokio"] } ntex = { version = "0.7", features = ["openssl", "rustls", "tokio"] }
env_logger = "0.10" env_logger = "0.10"
rustls-pemfile = "1.0" rustls-pemfile = "1.0"
webpki-roots = "0.25" webpki-roots = "0.25"

View file

@ -137,11 +137,8 @@ impl TlsClientFilter {
session.is_handshaking(), session.is_handshaking(),
); );
while session.wants_write() { if result.0.is_ok() && session.wants_write() {
result.0 = session.complete_io(&mut wrp); result.0 = session.complete_io(&mut wrp);
if result.0.is_err() {
break;
}
} }
result result
})?; })?;

View file

@ -145,11 +145,8 @@ impl TlsServerFilter {
session.is_handshaking(), session.is_handshaking(),
); );
while session.wants_write() { if result.0.is_ok() && session.wants_write() {
result.0 = session.complete_io(&mut wrp); result.0 = session.complete_io(&mut wrp);
if result.0.is_err() {
break;
}
} }
result result
})?; })?;