PandoraServer: Replace usage of shutdownNow with shutdown
Calling shutdown let us stop accepting new incoming connections and let the current ones finish. This is safer for PandoraServer than shutdownNow because we needed to call shutdownNow just after the completion of Reset as we wanted to respond to the client before restarting the server. But this could let the client make another call that the server could accept before the server shutdown. This should be prevented with shutdown as after shutdown return to the caller the server should not accept incoming connections anymore. So now we stop accepting incoming connections before responding to the client instead of after. Bug: 244615429 Test: atest -v pts-bot --iterations 4 Change-Id: If58bfedc053168fcce2e4c6e1364344ae489e3d5
Loading
Please register or sign in to comment