Skip to content

If "get_next_classical" timeouts, successive calls won't read any messages #146

@SDABIS

Description

@SDABIS

Describe the bug
Hi.
I'm trying to implement a network in which one node is listening to multiple neighbors. My current implementation makes multiple calls to "get_next_classical", but I encountered a bug: if a call to "get_next_classical" timeouts without receiving a message, any successive call to "get_next_classical" will also timeout, regardless if any message has arrived.

To Reproduce
Steps to reproduce the behavior:

  1. Create a template code
  2. Protocol_1 performs sleep(3), and then host.send_classical(receiver, s, await_ack=True)
  3. Protocol_2 performs host.get_next_classical(sender, wait=2).
  4. Protocol_2 performs host.get_next_classical(sender)

Expected behavior
Step 3 should always timeout, since Protocol_1 sleeps for 3 seconds. The second call to "get_next_classical" should wait for 1 second, and then return the message when Protocol_1 sends it.

What I encountered is that this second call to "get_next_classical" never reads the incoming message.

Metadata

Metadata

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