Skip to content

Need to synchronize watch() and watchCh() methods #8

@lucifercr07

Description

@lucifercr07
  • In current implementation there can be race conditions for both the methods if client object is shared between go-routines.
  • Even if client object is segregated race conditions can occur since WatchCh() method starts a separate go-routine that runs watch(). If the main go-routine calls Close() while watch() is running this can cause panic.
  • Also need to look at creation of client, it looks like it doesn't handshake with .WATCH rather with command, might need to fix.

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