File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
src/main/java/org/xbill/DNS Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,13 @@ Do NOT use it.
115115|1000
116116|700
117117
118+ .2+|dnsjava.nio.register_shutdown_hook
119+ 3+|Register Shutdown Hook for automatic termination of NIO.
120+ If disabled, the nio selector thread will not automatically clean up on JVM termination.
121+ |Boolean
122+ |True
123+ |False
124+
118125.2+|dnsjava.harden_unknown_additional
1191263+|Harden against unknown records in the authority section and additional section.
120127If disabled, such records are copied from the upstream and presented to the client together with the answer.
Original file line number Diff line number Diff line change 2525 * <dl>
2626 * <dt>dnsjava.nio.selector_timeout
2727 * <dd>Set selector timeout in milliseconds. Default/Max 1000, Min 1.
28+ * <dt>dnsjava.nio.register_shutdown_hook
29+ * <dd>Register Shutdown Hook termination of NIO. Default True.
2830 * </dl>
2931 *
3032 * @since 3.4
@@ -60,7 +62,9 @@ static Selector selector() throws IOException {
6062 selectorThread .start ();
6163 closeThread = new Thread (() -> close (true ));
6264 closeThread .setName ("dnsjava NIO shutdown hook" );
63- Runtime .getRuntime ().addShutdownHook (closeThread );
65+ if (Boolean .parseBoolean (System .getProperty ("dnsjava.nio.register_shutdown_hook" , "true" ))) {
66+ Runtime .getRuntime ().addShutdownHook (closeThread );
67+ }
6468 }
6569 }
6670 }
You can’t perform that action at this time.
0 commit comments