SyliusResourceBundle
SyliusResourceBundle copied to clipboard
Already transitioned resource transition
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | yes |
Sylius version | 1.1.* |
Steps to reproduce this scenario:
- create custom order
- as admin1 open detail of the order above
- open anonymous tab in browser, login as admin2 and open detail of the order above
- as admin2 in anonymous tab click on cancel order
- as admin1 in normal tab click on cancel order - BadRequestHttpException - Sylius/Bundle/ResourceBundle/Controller/ResourceController.php (line 556)
I think this is not common use case. But we have many admins and it already happened multiple times, that admin1 and admin2 have displayed order detail at the same time without refreshing the page.
Connections are stacking up, rather than being released after each redirect. Refactoring stuff now, thanks for the report.
I need to study this a bit to try to understand what is going on but am I right in thinking that this means it is not a good idea to have middleware that calls additional http requests? I have some crawler middleware that would need to make a call to some other url based on the response, would this mean that I would be sucking 2 threads up, the original thread blocking while another does my secondary http call?
If you wrap your middleware around request
, it wouldn't be an issue. I'm only doing it this way to minimize the overhead of applying all the middleware layers on each request. You made a good point, though, so I've made sure that any :middleware
passed into request
doesn't have to worry about this either.
Let me know if you have any other questions or concerns.