// Set a shutdown hook that will stop the sharing/seeding and send
// a STOPPED announce request.
Runtime.getRuntime().addShutdownHook(
new Thread(new Client.ClientShutdown(c, null)));
c.share(seedTimeValue);
if (Client.ClientState.ERROR.equals(c.getState())) {
System.exit(1);
}
} catch (Exception e) {
logger.error("Fatal error: {}", e.getMessage(), e);