Fixed SUB method of viewer

This commit is contained in:
ebner 2013-09-25 10:12:59 +02:00
parent a79ca128a5
commit 82af836113

View File

@ -114,6 +114,7 @@ public class ZeroMQViewer implements PlugIn {
} }
else if(method.equals("SUB")){ else if(method.equals("SUB")){
socket = context.socket(ZMQ.SUB); socket = context.socket(ZMQ.SUB);
socket.subscribe(""); // Subscribe to all topics
} }
else{ else{
logger.severe("Method not supported"); logger.severe("Method not supported");
@ -139,8 +140,10 @@ public class ZeroMQViewer implements PlugIn {
} }
finally{ finally{
try{ try{
logger.info("Close connection");
socket.close(); socket.close();
context.term(); context.term();
logger.info("Connection closed");
} }
catch(Exception e){ catch(Exception e){
} }