Skip to content

Client sending no_response option 26 keep active tasks #170

Open
@HRogge

Description

@HRogge

I am experimenting with both unicast and multicast and have trouble with the no_response option.
I have set the option (both on client transmission taks and on server resource) to 26 to make sure no response is generated (important for multicast), but the client (modified clientGET.py) keeps two tasks running anyways, most likely waiting for a response.

my clientPUT.py code:

    context = await Context.create_client_context()

    await asyncio.sleep(2)

    payload = b"The quick brown fox jumps over the lazy dog.\n"
    request = Message(code=PUT, mtype=NON, no_response=26, payload=payload, uri="coap://[fe80::250:56ff:fea8:e21%eth2]/other/separate")

    response = await context.request(request).response

    print('Result: %s\n%r'%(response.code, response.payload))

output of clientPUT.py after terminated with CTRL-C:

KeyboardInterrupt
ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending coro=<BlockwiseRequest._run_outer() running at /root/aiocoap/aiocoap/protocol.py:722> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7fcb3c7e4a68>()]>>
ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending coro=<Request._run() running at /root/aiocoap/aiocoap/protocol.py:608> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7fcb3c7e4be8>()]>>

Is there something special when sending a Message which should get no response?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions