/** Shutdown the media driver by stopping all threads and freeing resources. */ public void close() { try { runners.forEach(AgentRunner::close); freeSocketsForReuseOnWindows(); ctx.close(); } catch (final Exception ex) { LangUtil.rethrowUnchecked(ex); } }