Skip to content

Commit

Permalink
fix(coverity): fix errors in coverity report
Browse files Browse the repository at this point in the history
(cherry picked from commit eb89137)
  • Loading branch information
RobinzZH committed Jul 2, 2018
1 parent 0ec51bc commit 5afbea1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/proxy/http.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ function doRoute(req, res) {

dcapi.report({
key: 'EVENT_TSW_HTTP_IP_BLOCK',
toIp: clientIp || '127.0.0.1',
toIp: clientIp,
code: 0,
isFail: 0,
delay: 100
Expand Down
2 changes: 1 addition & 1 deletion bin/tsw/util/auto-report/logReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ function reportLog() {
res._body = Buffer.from(format.formatBuffer(res._body));
}

logJson = logJson || logger.getJson();
logJson = logJson || logger.getJson() || {};
logJson.curr = {
protocol: 'HTTP',
host: req.headers.host,
Expand Down

0 comments on commit 5afbea1

Please sign in to comment.