Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Pusher doesn't reconnect when network is disconnected for ~5 min

未关闭
#210 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
18/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
java
领域
networking

调研方向

The payload names no files. Start from the connection lifecycle and reconnect handling in the client, and from the changedConnectionState listener the reporter says fires only on initial connect. The reporter's snippets use reconnectAttemptsMax and maxReconnectGapInSeconds, which look like Swift-client syntax, so first check whether this Java client exposes those settings. Done means the client reconnects and reports a live socket ID after a 5-minute network outage. Reproducing that needs a way to drop the network for several minutes.

由索引模型根据 Issue 内容生成。

描述

bug

Pusher doesn't reconnect when network is disconnected for ~5 min.

Steps to reproduce:

Connect to Pusher and subscribe to channel. Events are received as usual.
Turn off Wifi for ~5 min.
Turn on Wifi.
What I can observe is that there is a Disconnection message in the web console once Wifi is turned on, but in the app, pusher.connection.connectionState still returns connected and pusher.connection.socketId returns the disconnected(as seen in the web console) socket id.
It works fine if Wifi is turned off for less than 2-3 min - it auto reconnects and receives events again, it's only an issue when it's disconnected for ~5 min or more.

I've also added

    pusher.connection.reconnectAttemptsMax = nil
    pusher.connection.maxReconnectGapInSeconds = 60

but it doesn't change anything.

I've also added a listener on changedConnectionState, but the only time it fires is during the initial connection setup - it goes from connecting to connected.

主要语言
Java
星标
315
派生
140
平均合并
11 天 5 小时
30 天内合并 PR
4

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pusher/pusher-websocket-java 的其他 Issue

查看 pusher/pusher-websocket-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。