diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index 5e15a0cc5..894f89393 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -259,6 +259,8 @@ jpg(srcfile, destfile, power2=7, password, data="", required, ind=0)\n\ jaddstr(retjson,"error",(char *)nn_strerror(nn_errno())); jaddnum(retjson,"err",err); jaddnum(retjson,"socket",IPC_ENDPOINT); + nn_close(IPC_ENDPOINT); + IPC_ENDPOINT = -1; } } else jaddstr(retjson,"error","couldnt get NN_PAIR socket"); } diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index 68227c110..e3ba84c30 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -191,7 +191,7 @@ int main(int argc, const char * argv[]) { if ( (len= nn_recv(IPC_ENDPOINT,&ptr,NN_MSG,0)) > 0 ) { - printf("nn_recv[%d] (%s)\n",len,(char *)ptr); + printf("%s\n",(char *)ptr); nn_freemsg(ptr); } }