Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Using Session.shutdown inside airframe-http endpoint causes deadlock #693

Closed
xerial opened this issue Sep 10, 2019 · 1 comment
Closed

Comments

@xerial
Copy link
Member

xerial commented Sep 10, 2019

This code can cause a deadlock:

@EndPoint(path="/shutdown")
def shutdown : Unit = {  
   session.shutdown   // Blocks because the server cannot be stopped until this returns some response
}

Possible solutions:

  • Run session.shutdown in a background thread
  • Force terminating FinagleServer
@xerial xerial added this to the Airframe 20 milestone Mar 17, 2020
@xerial xerial mentioned this issue Dec 4, 2020
90 tasks
@xerial xerial modified the milestones: Airframe 20, Airframe 21 Dec 4, 2020
@xerial
Copy link
Member Author

xerial commented Jan 9, 2024

A workaround is running this code in a separate thread.

@xerial xerial closed this as completed Jan 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants