Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Assertion failed: _input_stopped #118

Open
jean-airoldie opened this issue Jul 26, 2019 · 0 comments
Open

Assertion failed: _input_stopped #118

jean-airoldie opened this issue Jul 26, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@jean-airoldie
Copy link
Owner

See zeromq/libzmq#3596.

Here is a minimal rust test code to reproduce the issue.

use {
    failure::Error,
    libzmq::{prelude::*, *},
    std::{thread, time::Duration},
};

fn main() -> Result<(), Error> {
    let addr: TcpAddr = "0.0.0.0:*".try_into()?;

    let server = ServerBuilder::new().bind(addr).build()?;

    let addr = server.last_endpoint()?.unwrap();

    let client = ClientBuilder::new()
        .connect(addr)
        .recv_hwm(1)
        .heartbeat(Heartbeat::new(Duration::from_secs(1)))
        .build()?;

    // Retreive the routing id of the client.
    client.send("")?;
    let mut msg = server.recv_msg()?;
    let id = msg.routing_id().unwrap();

    thread::spawn(move || loop {
        // Send an empty message to the client using the routing_id.
        server.route("", id).unwrap();
    });

    // Simulate a slow client by receiving a message and waiting 10sec.
    loop {
        client.recv(&mut msg)?;
        thread::sleep(Duration::from_secs(10));
    }
}
@jean-airoldie jean-airoldie added the bug Something isn't working label Jul 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant