This commit is contained in:
@@ -606,15 +606,15 @@ public final class Application {
|
|||||||
buffer.flip();
|
buffer.flip();
|
||||||
channel.write(buffer);
|
channel.write(buffer);
|
||||||
buffer.clear();
|
buffer.clear();
|
||||||
channel.configureBlocking(false);
|
channel.configureBlocking(true);
|
||||||
try {
|
try {
|
||||||
channel.read(buffer);
|
channel.read(buffer);
|
||||||
buffer.flip();
|
buffer.flip();
|
||||||
byte[] bytes = new byte[buffer.remaining()];
|
byte[] bytes = new byte[buffer.remaining()];
|
||||||
buffer.get(bytes);
|
buffer.get(bytes);
|
||||||
channel.close();
|
channel.close();
|
||||||
logger.info(new String(bytes));
|
logger.info("Send: " + command + ", Reply: " + new String(bytes));
|
||||||
Thread.sleep(500);
|
Thread.sleep(1000);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof PortUnreachableException) {
|
if (e instanceof PortUnreachableException) {
|
||||||
if ("APIDOC".equalsIgnoreCase(command)) {
|
if ("APIDOC".equalsIgnoreCase(command)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user