From 405f9d6a0f6141bf4a48f8dd09ea6394b9d50b02 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Sun, 31 Jan 2021 14:04:13 -0800 Subject: [PATCH] Fix debug log exception on invalid session --- lib/cwmp.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/cwmp.ts b/lib/cwmp.ts index c7f583c..2125b6d 100644 --- a/lib/cwmp.ts +++ b/lib/cwmp.ts @@ -1570,8 +1570,10 @@ async function listenerAsync( return e; } ); - if (d) - debug.outgoingHttpResponse(httpResponse, sessionContext.deviceId, _body); + if (d) { + debug.incomingHttpRequest(httpRequest, null, bodyStr); + debug.outgoingHttpResponse(httpResponse, null, _body); + } httpResponse.end(_body); return; }