SyliusResourceBundle icon indicating copy to clipboard operation
SyliusResourceBundle copied to clipboard

Already transitioned resource transition

Open czende opened this issue 6 years ago • 0 comments

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? yes
Sylius version 1.1.*

Steps to reproduce this scenario:

  1. create custom order
  2. as admin1 open detail of the order above
  3. open anonymous tab in browser, login as admin2 and open detail of the order above
  4. as admin2 in anonymous tab click on cancel order
  5. 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.

czende avatar Apr 11 '18 14:04 czende

Connections are stacking up, rather than being released after each redirect. Refactoring stuff now, thanks for the report.

ztellman avatar Feb 28 '15 19:02 ztellman

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?

shmish111 avatar Feb 28 '15 23:02 shmish111

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.

ztellman avatar Feb 28 '15 23:02 ztellman