Fix match being wrong way around
This commit is contained in:
parent
7c5c37e9b5
commit
230c75ffd4
@ -84,7 +84,7 @@ if(errorMsg){
|
||||
const loggerTcpdump = logFactory("tcpdump");
|
||||
let linkTypeId;
|
||||
proc.stderr.setEncoding("utf8").on("data", (data) => {
|
||||
if(!data.match(/^(tcpdump: )?listening on /i) || !data.match(/^\d+ packets captured/i)) { // Catch start-error
|
||||
if(data.match(/^(tcpdump: )?listening on /i) || data.match(/^\d+ packets captured/i)) { // Catch start-error
|
||||
loggerTcpdump.debug(data);
|
||||
|
||||
if(!linkTypeId && data.match(/^(tcpdump: )?listening on/i)){ // Grab first data containing listen-info if proper header was found
|
||||
|
Loading…
x
Reference in New Issue
Block a user