Restarts the proxy server. This stops the current instance (if any) and starts a new one. @return the new proxy URL @throws IOException if the server fails to start @throws InterruptedException if the startup is interrupted
()
| 472 | * if the startup is interrupted |
| 473 | */ |
| 474 | public String restart() throws IOException, InterruptedException { |
| 475 | try { |
| 476 | stop(true); // Skip writing cache on restart |
| 477 | } catch (Exception e) { |
| 478 | // Best effort - force cleanup |
| 479 | if (process != null) { |
| 480 | process.destroyForcibly(); |
| 481 | process = null; |
| 482 | } |
| 483 | proxyUrl = null; |
| 484 | } |
| 485 | return start(); |
| 486 | } |
| 487 | |
| 488 | @Override |
| 489 | public void close() throws Exception { |
no test coverage detected