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
This code can cause a deadlock:
Possible solutions: