Open om26er opened 2 years ago
The text on this page clearly states that the previous client(s) should use have registered with force_reregister
for the following client to actually cause a reregister. https://crossbar.io/docs/Registration-Options/#force-reregister
Here is code for client 1
import txaio
txaio.use_asyncio() # noqa
from autobahn.asyncio.wamp import ApplicationSession, ApplicationRunner
from autobahn.wamp import SessionDetails
class Session(ApplicationSession):
async def onJoin(self, details: SessionDetails):
reg = await self.register(lambda: print("CALL"), "com.thing.test")
print("registered", reg.procedure)
if __name__ == '__main__':
runner = ApplicationRunner("ws://localhost:8080/ws", realm="realm1")
runner.run(Session, log_level="debug")
Code for client 2
import txaio
txaio.use_asyncio() # noqa
from autobahn.asyncio.wamp import ApplicationSession, ApplicationRunner
from autobahn.wamp import SessionDetails, RegisterOptions
class Session(ApplicationSession):
async def onJoin(self, details: SessionDetails):
reg = await self.register(lambda: print("CALL"), "com.thing.test", options=RegisterOptions(force_reregister=True))
print("registered", reg.procedure)
if __name__ == '__main__':
runner = ApplicationRunner("ws://localhost:8080/ws", realm="realm1")
runner.run(Session, log_level="debug")
fwiw, it's long ago I touched the code, but I agree, the behavior doesn't match what is in the docs (which does make sense). most likely not a big deal .. some lines ..
Result:
Expected:
force_reregister