Skip to content

Commit

Permalink
Merge pull request #67 from mattvalentine/patch-1
Browse files Browse the repository at this point in the history
Update first-app.md with default config on open
  • Loading branch information
Mallets authored Oct 14, 2024
2 parents 0ff9d33 + 159422d commit d404434
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/docs/getting-started/first-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def read_temp():
return random.randint(15, 30)

if __name__ == "__main__":
session = zenoh.open()
session = zenoh.open(zenoh.Config())
key = 'myhome/kitchen/temp'
pub = session.declare_publisher(key)
while True:
Expand All @@ -57,7 +57,7 @@ def listener(sample):
print(f"Received {sample.kind} ('{sample.key_expr}': '{sample.payload.deserialize(str)}')")

if __name__ == "__main__":
session = zenoh.open()
session = zenoh.open(zenoh.Config())
sub = session.declare_subscriber('myhome/kitchen/temp', listener)
time.sleep(60)
```
Expand Down

0 comments on commit d404434

Please sign in to comment.