В контроллер поступает Request и сервисная часть начинает готовить ответ (иногда до нескольких минут)
В это время на стороне Клиента, отправившего запрос может наступить timeout = 30, и запрос прекратиться.
Как мне на стороне сервера определить что запрос "разорван", и response отправлять нет смысла?
I have a back-end server in Laravel, it receives API requests to provide data and reports based on data from the database.
A Request arrives at the controller and the service part begins to prepare a response (sometimes up to several minutes)
At this time, on the side of the Client who sent the request, timeout = 30 may occur, and the request will stop.
How can I determine on the server side that the request is “broken” and there is no point in sending a response?
метод
Код: Выделить всё
connection_aborted()) {
// Соединение разорвано клиентом
Log::error('Connection aborted by client');
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... 0%bd%d1%8b