Merge branch 'main' of github.com:betrusted-io/xous-core into mtxchat-layout-tests

This commit is contained in:
bunnie 2023-11-30 18:19:20 +08:00
commit c5dff9d35d
4 changed files with 4 additions and 6 deletions

View file

@ -111,8 +111,7 @@ pub fn shellchat<'a>(
.unwrap();
log::info!("connect TCPstream to {}", target);
let url = format!("{}:443", target);
match TcpStream::connect(url) {
match TcpStream::connect((target, 443)) {
Ok(mut sock) => {
log::info!("tcp connected");
write!(ret, "{}", t!("tls.test_success_tcp", locales::LANG)).ok();

View file

@ -311,8 +311,7 @@ impl Tls {
let mut conn =
rustls::ClientConnection::new(Arc::new(config), server_name).unwrap();
log::info!("connect TCPstream to {}", target);
let url = format!("{}:443", target);
match TcpStream::connect(url) {
match TcpStream::connect((target, 443)) {
Ok(mut sock) => {
match conn.complete_io(&mut sock) {
Ok(_) => log::info!("handshake complete"),

View file

@ -47,7 +47,7 @@ fn bind_error() {
#[test]
fn connect_error() {
match TcpStream::connect("0.0.0.0:1") {
match TcpStream::connect(("0.0.0.0",1)) {
Ok(..) => panic!(),
Err(e) => assert!(
e.kind() == ErrorKind::ConnectionRefused

View file

@ -180,7 +180,7 @@ fn bind_error() {
}
fn connect_error() {
match TcpStream::connect("0.0.0.0:1") {
match TcpStream::connect(("0.0.0.0",1)) {
Ok(..) => panic!(),
Err(e) => {
log::info!("connect_error is {:?}", e);