Don't start jni server if a startup exception is thrown

This commit is contained in:
Jeremy Lakeman 2020-03-10 23:24:20 +10:30
parent ce51156f7e
commit a93ded21d0

View File

@ -142,6 +142,10 @@ JNIEXPORT jint JNICALL Java_org_servalproject_servaldna_ServalDCommand_server(
jstring str = (jstring)(*env)->NewStringUTF(env, instance_path());
(*env)->CallVoidMethod(env, callback, started, str, getpid(), mdp_loopback_port, httpd_server_port);
(*env)->DeleteLocalRef(env, str);
if ((*env)->ExceptionCheck(env)){
ret = WHY("Not starting server due to startup exception");
goto end;
}
}
server_loop(waiting, wokeup);