Skip to content

Commit 5419f23

Browse files
committed
disable tls by default on async-std
1 parent 168aebe commit 5419f23

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sqlx-core/src/mssql/connection/tls_prelogin_stream_wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl<S: AsyncRead + AsyncWrite + Unpin + Send> AsyncRead for TlsPreloginWrapper<
143143
buf: &mut [u8],
144144
) -> Poll<io::Result<usize>> {
145145
if self.pending_handshake {
146-
panic!("TLS not supported on async-std for mssql");
146+
unimplemented!("TLS not supported on async-std for mssql");
147147
}
148148

149149
Pin::new(&mut self.stream).poll_read(cx, buf)

sqlx-core/src/mssql/options/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ impl MssqlConnectOptions {
6060
server_name: String::new(),
6161
client_interface_name: String::new(),
6262
language: String::new(),
63+
#[cfg(feature = "_rt-tokio")]
6364
encrypt: Encrypt::On,
65+
#[cfg(not(feature = "_rt-tokio"))]
66+
encrypt: Encrypt::NotSupported,
6467
trust_server_certificate: true,
6568
hostname_in_certificate: None,
6669
ssl_root_cert: None,

0 commit comments

Comments
 (0)