Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Can't do a ClientFactory.start(), ClientFactory.stop(), then ClientFactory.start() in same session #119

Copy link
Copy link
@george-mcintyre

Description

@george-mcintyre
Issue body actions

Code Reference

  • ClientFactory.java:88 : ClientFactory.start()
  • ClientFactory.java:97: ClientFactory.stop()

To reproduce

When the following pattern is used:

ClientFactory.start();
// ... execute pvAccess request
ClientFactory.stop();

the static factory property in ClientFactory is set to a new ChannelProviderFactoryImpl() in ClientFactory.start() but is not cleared in ClientFactory.stop() if factory.destroySharedInstance() fails, even though the factory itself is unregistered. This means that the guard condition in ClientFactory.start() will prevent re-registering of the ChannelProviderFactory and thus all subsequent pvAccess requests fail. In slow network conditions I find that factory.destroySharedInstance() fails more often than not.

Problem:

When implementing a pvAccess executor for a scripted language in a slow network environment this pattern does not work because only the first pvAccess request works. I have to omit the ClientFactory.stop() to make subsequent pvAccess requests work.

Suggestion/Possible fix:

Set static ClientFactory.factory to null whether the factory.destroySharedInstance() succeeds or not. ClientFactory.java:103

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.