Skip to content

[BUG] Duplicate runner.run(Component) in Twisted pubsub basic example #1888

Description

@oberstet

Problem

examples/twisted/wamp/pubsub/basic/frontend.py calls runner.run(Component) twice in a row:

runner = ApplicationRunner(url, realm, extra)
runner.run(Component)
runner.run(Component)   # duplicate

(lines 68-69). The second call is dead/duplicate code — ApplicationRunner.run()
starts and blocks on the reactor, so the second call is at best redundant and at
worst confusing for readers learning from the example.

Fix

Remove the duplicate second runner.run(Component) line so the example ends with
a single runner.run(Component).

Notes


This analysis was produced with AI assistance (Claude Code) and requires human review before filing. Which I did.

Checklist

  • I have searched existing issues to avoid duplicates
  • I have provided a minimal reproducible example
  • I have included version information
  • I have included error messages/logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions