Skip to content

Streaming stops after the first ping/pong (flags freeze 10s after start since 1.1.8) #18

Description

@himanshu007-creator

Summary

Since 1.1.8, the streaming data source stops permanently ~10 seconds after start. Flag changes are no longer received until the process restarts, while client.initialize still returns True.

Confirmed root cause

  • The SDK sends {"messageType":"ping"} every 10 s; the evaluation server replies {"messageType":"pong","data":{}} (PingMessageHandler.cs, unchanged since 2023).
  • Since feat: expose variation ID, SDK status, and harden runtime safety #14, Streaming._on_message raises ValueError('invalid streaming data') for any message rejected by valide_all_data(), which only accepts data-sync.
  • The except branch closes the socket with _SelfClosed(is_reconn=False), so the streaming thread exits and never reconnects.

Reproduced on 1.1.9 with a clean install against FeatBit v6.0.0:

t=0s : toggled to False -> client sees False | state=OK
t=12s: toggled to True  -> client sees False | state=OFF   (log: close status: 1001 / self close)

On CPython 3.13/3.14, pip/Poetry can only install 1.1.9 (1.1.7 declares <3.13), so there is no working version there.

Proposed scope

  • Treat pong as a keep-alive reply in _on_message and return before data validation.
  • Keep the existing behaviour for genuinely invalid data unchanged.
  • Add unit tests covering a pong frame and the existing invalid-data path.

Acceptance criteria

  • A pong frame does not close the connection or change the data-update state.
  • Invalid non-pong messages still close the stream with the data-invalid state.
  • The full existing suite passes.
  • Flag changes are received more than 10 s after start against a live evaluation server.

Activity

  1. deleteLater commented on Oct 8, 2026

    @deleteLater
    Contributor

    This issue has been fixed in v1.1.10. Users running v1.1.8 or v1.1.9 should upgrade to v1.1.10 as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions