Skip to content

Circular reference in endpoint structure #21

@hk298

Description

@hk298

I'm expanding on the sample server apps you provided as examples and called something like this:
JSON.stringify(server.getEndpoint(req.params))

This produces the following error:

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Timeout'
    |     property '_idlePrev' -> object with constructor 'TimersList'
    --- property '_idleNext' closes the circle

Here's a snippet of getEndpoint's output when sent to the console log:

JanusWhipEndpoint {
  handle: VideoRoomHandle {
    session: Session {
      _ka_task: Timeout {
        _idleTimeout: 30000,
        _idlePrev: [Timeout],
        _idleNext: [Timeout],

How can this be fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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