-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
This script hangs:
import zenoh
from zenoh.ext import declare_advanced_subscriber
class ManagedSession:
def __init__(self):
pass
def __enter__(self):
self.session = zenoh.open(config=zenoh.Config())
self.subscriber = declare_advanced_subscriber(self.session, "test", self.sample_callback)
return self
def __exit__(self, exc_type, exc_val, exc_tb):
# workaround is to call
# self.subscriber.undeclare()
self.session.close()
def sample_callback(self, sample):
pass
with ManagedSession() as session:
passThis script does not hang:
import zenoh
class ManagedSession:
def __init__(self):
pass
def __enter__(self):
self.session = zenoh.open(config=zenoh.Config())
self.subscriber = self.session.declare_subscriber("test", self.sample_callback)
return self
def __exit__(self, exc_type, exc_val, exc_tb):
self.session.close()
def sample_callback(self, sample):
pass
with ManagedSession() as session:
passTo reproduce
See code examples above.
System info
eclipse-zenoh version 1.6.2 on x86-64 linux
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working