Background HTTP server in plugin

Answered

Comments

4 comments

  • Avatar
    Andrey Terentyev

    Hello,

    Could you please do the following?

    Take a sample_analytics_plugin in the Metadata SDK.
    Put your code dealing with HTTP server there.
    Try to reproduce the issue.
    Share the plugin code here. Just publish a link to the archive file.

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Graham Parry

    Hi Andrey
    Will do that.  In principle though is there any reason why threading would upset the server service starting?  The plugin behaves OK if I don't try and run the mini server separately.

     

     

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hi,

    In principle though is there any reason why threading would upset the server service starting?

    A bug in your code, most probably. Lost pointer or something similar.

    For example, in your code snippet, vnet * vnetptr is a local variable and is destroyed once the  DeviceAgent::DeviceAgent() method exits. Probably, you should declare and use a private member of the vnet * vnetptr type inside the DeviceAgent class.

    0
    Comment actions Permalink
  • Avatar
    Graham Parry

    Thanks.  Actually I may just have solved the issue I was inquiring about.  It's all a bit experimental at the moment as I find my way around the plugin, but I seem to have my server running again and the NX Server is stable.   Will obviously get back if I'm stuck, but I'll bear your thoughts in mind when doing any threading.

    0
    Comment actions Permalink

Please sign in to leave a comment.