Skip to content

Commit 425e45c

Browse files
committed
Setting factory to null after destroying it, so that the next time the start() method is called, a new factory is created. This fixes #88
1 parent c7343f0 commit 425e45c

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

pvAccessJava/src/org/epics/ca/ClientFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public static synchronized void stop() {
104104
{
105105
ChannelProviderRegistryFactory.unregisterChannelProviderFactory(factory);
106106
factory.destroySharedInstance();
107+
factory=null;
107108
}
108109
}
109110

@@ -148,7 +149,7 @@ public void destroy() {
148149
context.destroy();
149150
} catch (CAException e) {
150151
e.printStackTrace();
151-
}
152+
}
152153
}
153154
/* (non-Javadoc)
154155
* @see org.epics.pvaccess.client.ChannelProvider#channelFind(java.lang.String, org.epics.pvaccess.client.ChannelFindRequester)

pvAccessJava/src/org/epics/pvaccess/ClientFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public static synchronized void stop() {
9696
{
9797
ChannelProviderRegistryFactory.unregisterChannelProviderFactory(factory);
9898
factory.destroySharedInstance();
99+
factory=null;
99100
}
100101
}
101102
}

0 commit comments

Comments
 (0)