• Bjorn Svensson's avatar
    Avoid incorrect call to the previous reply's callback (#1040) · be41ed60
    Bjorn Svensson authored
    * No reuse of the previous reply callback
    
    When multiple replies are parsed from a socket in one read
    a previously found callback might get reused when the current
    reply has no known callback.
    
    This can be triggered by the added testcase which unsubscribe to
    subscribed (A,B) and a non-subscribed channel (X).
    Without this correction a callback for wrong channel is called.
    -  In 'unsubscribe B X A', B's callback is called when handling X.
    -  Now this is not done, i.e. there is no callback called for X.
    
    * Re-push monitor callback for each reply
    
    MONITORING used the same callback for all replies while parsing
    multiple responses. This handling was changed to avoid calling
    the wrong callback in some scenarios.
    Now also change monitorings repush to work with this change.
    
    Includes an added async monitoring testcase.
    be41ed60
test.c 69.9 KB