From 0009dac3a4cacf30a6927e742dfe7fe42239004a Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 16 Sep 2020 17:14:40 +0200 Subject: [PATCH] Fix MPTCP graph --- luci-app-mptcp/luasrc/controller/mptcp.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/luci-app-mptcp/luasrc/controller/mptcp.lua b/luci-app-mptcp/luasrc/controller/mptcp.lua index 38eae6c4e..3a5433bcc 100644 --- a/luci-app-mptcp/luasrc/controller/mptcp.lua +++ b/luci-app-mptcp/luasrc/controller/mptcp.lua @@ -98,7 +98,11 @@ function multipath_bandwidth() res[key][1]=temp1[1] for i=2,60 do res[key][i]={} - res[key][i]=(string.gsub(temp1[i], "%[", " ")) + if temp1[i] ~= "" and temp1[i] ~= nil then + res[key][i]=(string.gsub(temp1[i], "%[", " ")) + else + res[key][i]="0,0,0,0,0" + end end for i=1,60 do res[key][i] = string.split(res[key][i], ",")