diff --git a/ch.psi.imagej.zeromq/pom.xml b/ch.psi.imagej.zeromq/pom.xml index b3d5975..a98c0d5 100644 --- a/ch.psi.imagej.zeromq/pom.xml +++ b/ch.psi.imagej.zeromq/pom.xml @@ -3,7 +3,7 @@ 4.0.0 ch.psi ch.psi.imagej.zeromq - 0.0.6-SNAPSHOT + 0.0.7 diff --git a/ch.psi.imagej.zeromq/src/main/java/ch/psi/imagej/zeromq/ZeroMQViewer.java b/ch.psi.imagej.zeromq/src/main/java/ch/psi/imagej/zeromq/ZeroMQViewer.java index 2d46266..8a4c2ff 100644 --- a/ch.psi.imagej.zeromq/src/main/java/ch/psi/imagej/zeromq/ZeroMQViewer.java +++ b/ch.psi.imagej.zeromq/src/main/java/ch/psi/imagej/zeromq/ZeroMQViewer.java @@ -131,7 +131,14 @@ public class ZeroMQViewer implements PlugIn { } catch(Exception e){ logger.log(Level.SEVERE, "",e); - btnStart.setText("Start"); + } + finally{ + try{ + socket.close(); + context.term(); + } + catch(Exception e){ + } } } @@ -312,8 +319,7 @@ public class ZeroMQViewer implements PlugIn { try{ socket.notifyAll(); } - catch(Exception ex){ - // This exception can savely be ignored (somewhat most of the time an exception is expected) + catch(Exception ex){ // This exception can savely be ignored (somewhat most of the time an exception is expected) } btnStart.setText("Start"); }