Repository navigation
Conversation
v3.7.2 sends websocket pings but sets no read deadline, so a half-open connection leaves event consume blocked with no reconnect. The pong timeout landed in v3.11.0 (larksuite/oapi-sdk-go#244); take v3.12.2. Co-authored-by: dEthan3 <iimsyw@gmail.com>
oapi-sdk-go v3.12.2 builds a private http.Client for endpoint bootstrap, so the CLI bridge on the init-captured client never saw those requests. Pass that client via larkws.WithHttpClient from every websocket constructor. Tests use the same pointer: it is the production path, and it stays pinned when http.DefaultClient is replaced. Record the SDK packages newly linked into the binary. Co-authored-by: dEthan3 <iimsyw@gmail.com>
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
lark-cli event consumecan stay "connected" while receiving no events after a half-open websocket. oapi-sdk-go v3.7.2 sends pings but sets no read deadline or pong timeout, so the read loop blocks forever and never reconnects. Observed on 2026-10-16: the bus log showed no disconnect, yet zero events for about 70 minutes. Abnormal 1006 closes behind a local egress proxy looked similar to #2358.The SDK fix is larksuite/oapi-sdk-go#224, merged in larksuite/oapi-sdk-go#244 (v3.11.0). This takes v3.12.2.
Changes
github.com/larksuite/oapi-sdk-go/v3from v3.7.2 to v3.12.2.http.DefaultClientfor websocket endpoint bootstrap. Pass the CLI's pinned client vialarkws.WithHttpClientso proxy and platform policy still apply (event consume,event subscribe,mail watch).Test Plan
go build ./...go vet ./...gofmt -l .cleango test -count=1 -timeout=8m ./internal/...(80 packages, 0 failed)--new-from-rev=upstream/mainandlintcheckagainstupstream/mainRelated Issues
Summary by CodeRabbit