[zeromq-dev] Assertion failed: false (src/pipe.cpp:429) on disconnecting a SUB Socket.
Bachmair Florian - flexSolution GmbH
florian.bachmair at flexsolution.eu
Tue May 9 07:23:56 CEST 2017
Hi!
I'm using a JNI Wrapper to use czmq.(with the latest libzmq and czmq
from git,compiled yesterday on an arm)
Don't know if this is just a coincidents but this is how I reproduce the
error:
* start all Applications(6) (on the same host) they connect to each
other via TCP automatically
* If I restart 2 applications at the same time, they may get new
Ports, the other applications do recognize that(every Application
announces their ports via multicast) and disconnect from the old,
now invalid socket
* 1-2 of the Applications crashes with the error Assertion failed:
false (src/pipe.cpp:429) when they try to close the socket.
Any Idea what I am doing wrong here?
JNIEXPORT void JNICALL
Java_lib_zmq_ZeroMQNative_native_1disconnect(JNIEnv * env, jobject
object, jstring ip, jint port) {
// ===============================================
// Convert Java Objects to C
// ===============================================
puts("debug 1");
fflush(stdout);
const char* c_ip = (*env)->GetStringUTFChars(env, ip, 0);
printf("debug 2: %s:%d \n",c_ip,port);
fflush(stdout);
// ===============================================
// Disconnect from tcp://ip:port
// ===============================================
zsock_disconnect(subscriber, "tcp://%s:%d", c_ip, port);
//Assertion failed: false (src/pipe.cpp:429)
puts("debug 3");
fflush(stdout);
// ===============================================
// Free Resources
// ===============================================
(*env)->ReleaseStringUTFChars(env, ip, c_ip);
puts("debug 4");
fflush(stdout);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170509/331e799a/attachment.htm>
More information about the zeromq-dev
mailing list