|
@@ -72,7 +72,7 @@ public class HttpEventTask implements Runnable { |
|
|
new OutputStreamWriter(outputStream, Charset.forName(SentinelConfig.charset()))); |
|
|
new OutputStreamWriter(outputStream, Charset.forName(SentinelConfig.charset()))); |
|
|
|
|
|
|
|
|
String line = in.readLine(); |
|
|
String line = in.readLine(); |
|
|
CommandCenterLog.info("[CommandCenter] socket income:" + line |
|
|
|
|
|
|
|
|
CommandCenterLog.info("[SimpleHttpCommandCenter] socket income: " + line |
|
|
+ "," + socket.getInetAddress()); |
|
|
+ "," + socket.getInetAddress()); |
|
|
CommandRequest request = parseRequest(line); |
|
|
CommandRequest request = parseRequest(line); |
|
|
|
|
|
|
|
@@ -95,10 +95,10 @@ public class HttpEventTask implements Runnable { |
|
|
printWriter.flush(); |
|
|
printWriter.flush(); |
|
|
|
|
|
|
|
|
long cost = System.currentTimeMillis() - start; |
|
|
long cost = System.currentTimeMillis() - start; |
|
|
CommandCenterLog.info("[CommandCenter] deal a socket task:" + line |
|
|
|
|
|
+ "," + socket.getInetAddress() + ", time cost=" + cost + " ms"); |
|
|
|
|
|
|
|
|
CommandCenterLog.info("[SimpleHttpCommandCenter] Deal a socket task: " + line |
|
|
|
|
|
+ ", address: " + socket.getInetAddress() + ", time cost: " + cost + " ms"); |
|
|
} catch (Throwable e) { |
|
|
} catch (Throwable e) { |
|
|
CommandCenterLog.info("CommandCenter error", e); |
|
|
|
|
|
|
|
|
CommandCenterLog.warn("[SimpleHttpCommandCenter] CommandCenter error", e); |
|
|
try { |
|
|
try { |
|
|
if (printWriter != null) { |
|
|
if (printWriter != null) { |
|
|
String errorMessage = SERVER_ERROR_MESSAGE; |
|
|
String errorMessage = SERVER_ERROR_MESSAGE; |
|
@@ -110,7 +110,7 @@ public class HttpEventTask implements Runnable { |
|
|
printWriter.flush(); |
|
|
printWriter.flush(); |
|
|
} |
|
|
} |
|
|
} catch (Exception e1) { |
|
|
} catch (Exception e1) { |
|
|
CommandCenterLog.info("CommandCenter close serverSocket failed", e); |
|
|
|
|
|
|
|
|
CommandCenterLog.warn("[SimpleHttpCommandCenter] Close server socket failed", e); |
|
|
} |
|
|
} |
|
|
} finally { |
|
|
} finally { |
|
|
closeResource(in); |
|
|
closeResource(in); |
|
@@ -124,7 +124,7 @@ public class HttpEventTask implements Runnable { |
|
|
try { |
|
|
try { |
|
|
closeable.close(); |
|
|
closeable.close(); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
CommandCenterLog.info("CommandCenter close resource failed", e); |
|
|
|
|
|
|
|
|
CommandCenterLog.warn("[SimpleHttpCommandCenter] Close resource failed", e); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|