Possible reconnectWait unit mismatch on Android

Open Beginner friendly
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, swift
Domain
mobile

Research direction

Start at the Android implementation of the reconnectWait and reconnectWaitMax cases shown in the issue, then verify the Java APIs' expected units. Compare that behavior with the documented seconds-based values and confirm the result using a small reconnect delay such as .reconnectWait(2). Done means both Android settings consistently honor the documented units.

Written by the indexing model from the issue text.

Description

Think i found a small issue.

reconnectWait and reconnectWaitMax appear to use different units across platforms.

They are documented as seconds, but the Android implementation passes them directly to Java APIs that expect milliseconds:

case .reconnectWait(let value):
    builder = builder.setReconnectionDelay(Long(value))
case .reconnectWaitMax(let value):
    builder = builder.setReconnectionDelayMax(Long(value))

Could these values need to be multiplied by 1,000 on Android?

For example, .reconnectWait(2) seems to produce a 2 ms delay on Android instead of 2 seconds.

Dominant language
Swift
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.