context cleanup and subscribe, but still heavily broken
[svn42.git] / go / door_client_zmq / main.go
index 193c643..f63a0ee 100644 (file)
@@ -55,9 +55,10 @@ func ByteArrayToString(bb [][]byte) string {
 }
 
 func main() {
-    cmd_chans, sub_chans := ZmqsInit(cmd_port_, sub_port_)
+    zmqctx, cmd_chans, sub_chans := ZmqsInit(cmd_port_, sub_port_)
     defer cmd_chans.Close()
     defer sub_chans.Close()
+    defer zmqctx.Close()
     var listen bool
     var ignore_next bool