Skip to content

unix sockets don't work since the 0.99.6 release #248

Closed
@dvc94ch

Description

@dvc94ch

Expected behaviour:

loop
connected
loop

Actual behaviour:

loop

server.rs

use async_std::prelude::*;
use async_std::os::unix::net::UnixListener;
use async_std::task;

async fn run() {
    let socket = UnixListener::bind("/tmp/test.sock").await.expect("bind");
    let mut incoming = socket.incoming();
    loop {
        println!("loop");
        if let Some(stream) = incoming.next().await {
            println!("connected");
        }
    }
}

fn main() {
    task::block_on(run());
}

client.rs

use async_std::task;
use async_std::prelude::*;
use async_std::os::unix::net::UnixStream;

async fn run() {
    let mut socket = UnixStream::connect("/tmp/test.sock").await.expect("connect");
    socket.write_all(b"hello world").await.expect("write");
    socket.flush().await.expect("flush");
}

fn main() {
    task::block_on(run());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions