7 Replies Latest reply on Aug 8, 2016 9:16 AM by jethomas RSS
    jethomas Newbie

    Can't reconnect agent after disconnect - node/c sdk

    I am currently using the node sdk from the developer zone, which is a wrapper for the c sdk.I successfully initialize and connect. Upon connecting I get the message:


    [Force] twWs_Connect: Websocket connected!


    Then I disconnect I get two messages. the first is:

    [Warn] msgHandlerOnClose: WEBSOCKET CLOSED

     

    and the second is:

    [Warn] Disconnect detected - Normal Close Agent shutting down.

     

    Then I would like to reconnect the agent.

    I once again get the message: [Force] twWs_Connect: Websocket connected!

     

    Everything seems okay, but then the program slowly starts to take more and more memory to run and eventually freezes. There seems to be something happening in the c sdk that I can't see. Based on the calls from the dynamic library, it seems to only call twApi_Initialize, twApi_Connect, and twApi_Disconnect. Is there another function that should be called? Or is it not possible to call connect after a disconnect?

     

    In summary, I am using the node sdk and want to disconnect and then connect again, but seem unable to do so.