You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It will get error "Error: Pool(Backend(Io { kind: UnexpectedEof, message: "tls handshake eof" }))" immediately when connecting to SQL Server 2014 on macos.
use deadpool_tiberius;#[tokio::main]asyncfnmain() -> deadpool_tiberius::SqlServerResult<()>{let pool = deadpool_tiberius::Manager::new().host("192.168.50.74")// default to localhost.port(1433)// default to.basic_authentication("user","password")// or .authentication(tiberius::AuthMethod).database("test").trust_cert().max_size(10).wait_timeout(15).pre_recycle_sync(|_client, _metrics| Ok(())).create_pool()?;letmut conn = pool.get().await?;let _rows = conn.simple_query("SELECT 1").await.unwrap();Ok(())}
[dependencies]
deadpool = "0.12"deadpool-tiberius = { version = "0.1", default-features = false, features = [
"rustls",
# "native-tls",# "vendored-openssl",
] }
futures = "0.3"futures-core = "0.3"tiberius = { version = "0.12", default-features = false, features = [
"rustls",
# "native-tls",# "vendored-openssl","tds73",
] }
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["compat"] }
using deadpool
I will get error immediately: Error: Pool(Backend(Io { kind: UnexpectedEof, message: "tls handshake eof" }))
use deadpool_tiberius;#[tokio::main]asyncfnmain() -> deadpool_tiberius::SqlServerResult<()>{let pool = deadpool_tiberius::Manager::new().host("192.168.50.74")// default to localhost.port(1433)// default to.basic_authentication("user","password")// or .authentication(tiberius::AuthMethod).database("test").trust_cert().max_size(10).wait_timeout(15).pre_recycle_sync(|_client, _metrics| Ok(())).create_pool()?;letmut conn = pool.get().await?;let _rows = conn.simple_query("SELECT 1").await.unwrap();Ok(())}
using bb8
It will not return error immediately, it will ignore the error in bb8::ManageConnection.connect.
This is not expected, since I use pool.get to get connection then query something to check the database is healthy at program startup, it should return error immediately when tls handshake eof error occurs.
without database pool
It will get error "Error: Pool(Backend(Io { kind: UnexpectedEof, message: "tls handshake eof" }))" immediately when connecting to SQL Server 2014 on macos.
prisma/tiberius#364
using deadpool
I will get error immediately: Error: Pool(Backend(Io { kind: UnexpectedEof, message: "tls handshake eof" }))
using bb8
It will not return error immediately, it will ignore the error in bb8::ManageConnection.connect.
This is not expected, since I use pool.get to get connection then query something to check the database is healthy at program startup, it should return error immediately when tls handshake eof error occurs.
The text was updated successfully, but these errors were encountered: