提交 6ee2100c 编写于 作者: K kimi

DUBBO-459 skip unused stream时仅在stream中还有未读数据时才打log

上级 d62835c6
......@@ -207,13 +207,15 @@ public class ExchangeCodec extends TelnetCodec {
return req;
}
} finally {
try {
if (logger.isWarnEnabled()) {
logger.warn("Skip input stream " + is.available());
}
StreamUtils.skipUnusedStream(is);
} catch (IOException e) {
logger.warn(e.getMessage(), e);
if (is.available() > 0) {
try {
if (logger.isWarnEnabled()) {
logger.warn("Skip input stream " + is.available());
}
StreamUtils.skipUnusedStream(is);
} catch (IOException e) {
logger.warn(e.getMessage(), e);
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册