Skip to content

In the loop, GET request: Operation already in progress occurs and processing stops. #30

@ghost

Description

@JakobGreen

while true  do
   local domain = 'https://example.com/'
   local page = 1
   local url + domain .. page
   local response = requests.get(url, {timeout = 1})
   page = page + 1
end

When we do this, the following error occurs and the process stops.

/usr/bin/luajit: /usr/local/share/lua/5.1/requests.lua:111: error in GET request: Operation already in progress
stack traceback:
[C]: in function 'assert'
/usr/local/share/lua/5.1/requests.lua:111: in function 'get'
...
[C]: at 0x5624b164e120


https://github.com/JakobGreen/lua-requests/blob/master/src/requests.lua#L111

This process is just doing socket.request(full_request), so I don't know why the problem occurs. Is there anything I need to pay attention to when using it, such as intentionally closing the socket?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions