Skip to content

Commit 2186d3f

Browse files
committed
minor optimization from Will Bond in openresty#10.
1 parent eaf2ec3 commit 2186d3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/resty/upload.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ end
9797
local function discard_line(self)
9898
local read_line = self.read_line
9999

100-
local line, err = self.read_line(MAX_LINE_SIZE)
100+
local line, err = read_line(MAX_LINE_SIZE)
101101
if not line then
102102
return nil, err
103103
end
104104

105-
local dummy, err = self.read_line(1)
105+
local dummy, err = read_line(1)
106106
if dummy then
107107
return nil, "line too long: " .. line .. dummy .. "..."
108108
end

0 commit comments

Comments
 (0)