This commit is contained in:
@@ -465,13 +465,27 @@ public final class Application {
|
|||||||
channel.write(buffer);
|
channel.write(buffer);
|
||||||
buffer.clear();
|
buffer.clear();
|
||||||
channel.configureBlocking(false);
|
channel.configureBlocking(false);
|
||||||
channel.read(buffer);
|
try {
|
||||||
buffer.flip();
|
channel.read(buffer);
|
||||||
byte[] bytes = new byte[buffer.remaining()];
|
buffer.flip();
|
||||||
buffer.get(bytes);
|
byte[] bytes = new byte[buffer.remaining()];
|
||||||
channel.close();
|
buffer.get(bytes);
|
||||||
logger.info(new String(bytes));
|
channel.close();
|
||||||
Thread.sleep(500);
|
logger.info(new String(bytes));
|
||||||
|
Thread.sleep(500);
|
||||||
|
} catch (Exception e) {
|
||||||
|
if (e instanceof PortUnreachableException) {
|
||||||
|
if ("APIDOC".equalsIgnoreCase(command)) {
|
||||||
|
final Application application = Application.create(true);
|
||||||
|
application.init();
|
||||||
|
application.start();
|
||||||
|
new ApiDocs(application).run();
|
||||||
|
logger.info("APIDOC OK");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() throws Exception {
|
public void start() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user