good morning!!!!

Skip to content
Snippets Groups Projects
Forked from github / maticnetwork / bor
Source project has a limited visibility.
  • Felix Lange's avatar
    rpc: tighter shutdown synchronization in client subscription (#22597) · 4a37ae51
    Felix Lange authored
    This fixes a rare issue where the client subscription forwarding loop
    would attempt send on the subscription's channel after Unsubscribe has
    returned, leading to a panic if the subscription channel was already
    closed by the user. Example:
    
        sub, _ := client.Subscribe(..., channel, ...)
        sub.Unsubscribe()
        close(channel)
    
    The race occurred because Unsubscribe called quitWithServer to tell the
    forwarding loop to stop sending on sub.channel, but did not wait for the
    loop to actually come down. This is fixed by adding an additional channel
    to track the shutdown, on which Unsubscribe now waits.
    
    Fixes #22322
    Unverified
    4a37ae51
Code owners
Assign users and groups as approvers for specific file changes. Learn more.