mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[plugin] HTTPInspector: return InputEvent on every call to reset standby/suspend timer (#13339)
Fixes #13303.
This commit is contained in:
@@ -50,7 +50,7 @@ function SimpleTCPServer:waitEvent()
|
||||
logger.dbg("SimpleTCPServer: Received data: ", data)
|
||||
-- Give us more time to process the request and send the response
|
||||
client:settimeout(0.5, "t")
|
||||
self.receiveCallback(data, client)
|
||||
return self.receiveCallback(data, client)
|
||||
-- This should call SimpleTCPServer:send() to send
|
||||
-- the response and close this connection.
|
||||
else
|
||||
|
||||
@@ -290,6 +290,7 @@ function HttpInspector:sendResponse(reqinfo, http_code, content_type, body)
|
||||
if self.http_socket then -- in case the plugin is gone...
|
||||
self.http_socket:send(response, reqinfo.request_id)
|
||||
end
|
||||
return Event:new("InputEvent") -- as a key event, reset any standby/suspend timer
|
||||
end
|
||||
|
||||
-- Process a uri, stepping one fragment (consider ? / = as separators)
|
||||
|
||||
Reference in New Issue
Block a user