Skip to content

Commit

Permalink
Avoid deadlock issue in CAJ/JCA lib
Browse files Browse the repository at this point in the history
  • Loading branch information
slominskir committed Jan 14, 2019
1 parent 2931cba commit 7894103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/java/org/jlab/epics2web/epics/ChannelMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ public void close() throws IOException {
//LOGGER.log(Level.FINEST, "close");
if (channel != null) {
try {
channel.destroy();
// channel.destroy(); // method is unsafe (can deadlock)
// so use context method instead
context.destroyChannel(channel, true);
} catch (CAException e) {
throw new IOException("Unable to close channel", e);
}
Expand Down

0 comments on commit 7894103

Please sign in to comment.