Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

关于使用长连接的情况下,关闭Socket

Open
#159 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
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
api

Research direction

Start by locating ws.Client and reviewing the visibility of its start, disconnect, and reconnect methods. Compare the requested edit and deletion lifecycle in the issue with the current public API. Done means callers can perform the required disconnect/reconnect operations externally, with the behavior confirmed by the project’s existing checks.

Written by the indexing model from the issue text.

Description

我司有个场景,需要可以在页面通过配置的形式接入飞书机器人,并且采用长连接的方式监听推送过来的事件消息,所以涉及到以下问题:

  1. 首次创建时,需要构建ws.Client,并start
  2. 编辑时,需要先把原来的ws.Client进行reconnect,即先disconnect,再start
  3. 删除时,需要把原来的ws.Client进行disconnect,并置空

对于以上3点,1已经实现,2和3存在问题:

  1. ws.Client有start、disconnect、reconnect三个方法,但是disconnect、reconnect这两个方法被protected修饰了,外部无法调用

请问一下:
能够将上述两个方法也变成public,如果不可以,还方便描述一下原因。谢谢

Dominant language
Java
Stars
311
Forks
115
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from larksuite/oapi-sdk-java

All issues in larksuite/oapi-sdk-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.