Skip to content

Commit

Permalink
chore: sniffer/ws update
Browse files Browse the repository at this point in the history
  • Loading branch information
Musixal committed Oct 23, 2024
1 parent fcaf92c commit d72d633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/utils/wsConnHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func transferWebSocketToTCP(wsConn *websocket.Conn, tcpConn net.Conn, logger *lo
}
logger.Tracef("transferred data from WebSocket to TCP: %d bytes", w)
if sniffer {
go usage.AddOrUpdatePort(remotePort, uint64(w))
usage.AddOrUpdatePort(remotePort, uint64(w))
}
}
}
Expand Down Expand Up @@ -90,7 +90,7 @@ func transferTCPToWebSocket(tcpConn net.Conn, wsConn *websocket.Conn, logger *lo

logger.Tracef("transferred data from TCP to WebSocket: %d bytes", n)
if sniffer {
go usage.AddOrUpdatePort(remotePort, uint64(n))
usage.AddOrUpdatePort(remotePort, uint64(n))
}
}
}

0 comments on commit d72d633

Please sign in to comment.