Skip to content

The logic in stream ID direction detection seems wrong #381

Description

@KershawChang

The current logic for determining whether a stream is incoming or not seems incorrect to me.
Specifically, the logic:

const incoming = this.isclient ? !(streamid & 0x1n) : !!(streamid & 0x1n)

For example, when streamid = 4n:

  • This is a client-initiated bidirectional stream.
  • If this.isclient === false (i.e., we are the server), this stream should be incoming.
  • However, this code returns false.

As I understand it, stream ID 4 should be treated as an incoming stream on the server side.
Am I missing something?

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