The Request You Forgot to Cancel
· 6 min read
You open a product detail screen. The app fires a request to load the data. You change your mind and swipe back. Flutter pops the route, disposes the widget, closes the cubit. Everything on the Flutter side cleaned up correctly.
But out on the internet, a request is still running.
The server received it. It's querying the database, serializing JSON, preparing a response. Nobody is waiting for that response anymore — the screen is gone, the cubit is gone, the state is gone. But the server doesn't know that. So it finishes the work anyway, sends the bytes back, and your app quietly receives them, parses them, and throws them away.
This is the part that always gets missed.
