Repository navigation
Release v3.1.2: ignore unknown response fields, pubsub reconnect fixes - #20
Merged
Merged
Conversation
- onFailure (a failed connect, or a dropped socket from a server restart or network change) now reconnects; before, only onClosed did, so one failure ended live updates for good. - The reconnect reuses urlIdWS, so it rejoins the same room instead of the raw urlId. - Backoff is full jitter over a 4s window doubling to 60s, reset on open; a 4xx upgrade is retried every 5 minutes. - One idle-timeout scheduler thread per subscriber instead of a Timer thread per reconnect. - close() reaches the current socket after reconnects; only the newest connection may reconnect, and onClosing/onClosed schedule one reconnect between them (compareAndSet), so no stray socket delivers events twice. - lastEventTime is an AtomicLong, so concurrent event times can't move it backwards.
winrid
force-pushed
the
fix-ws-reconnect
branch
from
November 16, 2026 05:19
f8ba321 to
dcae08a
Compare
The spec no longer marks models additionalProperties: false, so the regenerated models keep fields they don't know instead of throwing. getCommentsPublic threw on the new allowSimpleSSOAdmins customConfig field for Simple SSO tenants. New fields: CustomConfigParameters.allowSimpleSSOAdmins and autoVerifySimpleSSOComments, TenantPackage.pricingCurrency, monthlyCostLocal and yearlyCostLocal, WebhookComment.badges.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FastComments Java SDK v3.1.2
Fix: responses with fields the client doesn't know threw
IllegalArgumentExceptionThe models rejected any response field missing from their schema. When the server added
allowSimpleSSOAdminsto the widget config,PublicApi.getCommentsPublicthrewThe field allowSimpleSSOAdmins in the JSON string is not defined in the CustomConfigParameters propertiesfor every tenant using Simple SSO, so the Android SDK couldn't load comments there.The spec no longer marks models
additionalProperties: false, so every model now keeps unknown fields (getAdditionalProperties(),getAdditionalProperty(name)) instead of throwing. A new server field no longer breaks older clients.corehas a regression test (UnknownResponseFieldsTest).Fix: pubsub
LiveEventSubscriberstopped receiving live events after one failureonFailurenow reconnects. A failed connect and a dropped open socket both land there, not inonClosed, so before this nothing retried. The reconnect'sonOpenfetches events missed in between.urlIdWS, so they rejoin the same room instead of the rawurlId.Timerthread per attempt.close()closes the current socket after reconnects.onClosingandonClosedrun on different OkHttp threads and now schedule a single reconnect between them, so no stray socket stays open delivering duplicate events.AtomicLong, so concurrent events can't move it backwards and make a reconnect refetch events already delivered.New
LiveEventSubscriberReconnectTest(JUnit + MockWebServer, 7 tests).New model fields
CustomConfigParameters:allowSimpleSSOAdmins,autoVerifySimpleSSOCommentsTenantPackage:pricingCurrency,monthlyCostLocal,yearlyCostLocalWebhookComment:badges(List<CommentUserBadgeInfo>)No breaking changes.
Install
Full changelog: v3.1.1...v3.1.2