Skip to content

Clients propagate pre-existing tokens to local sessions #2283

@fuzzypixelz

Description

@fuzzypixelz

Describe the bug

Because clients propagate interest in Future mode, they cannot reliably decide if a token is fresh or not.

To reproduce

#!/usr/bin/env nuze -X0

# stdout:
# a: declare token on x
# c2: declare token on x
# c1: new token PUT on x

zenoh open -s a {mode:router,id:a,listen:{endpoints:[tcp/::1:9000]}}
sleep 100ms

zenoh runtime open c {mode:client,id:c,connect:{endpoints:[tcp/::1:9000]}}
zenoh open -s c1 --runtime c
zenoh open -s c2 --runtime c
sleep 100ms

print "a: declare token on x"
let x = zenoh liveliness declare-token -s a x
sleep 100ms

job spawn {zenoh liveliness sub -s c1 x | each {|s| print $"c1: new token ($s.kind) on x"}}
sleep 100ms

print "c2: declare token on x"
let x2 = zenoh liveliness declare-token -s c2 x
sleep 100ms

System info

Metadata

Metadata

Assignees

No one assigned

    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