看起来Server#setGracefulShutdown从Jetty9更改为Server#setStopTimeout。但它看起来并不是以同样的方式行事。 它看起来不像Jetty9在关闭之前不等待请求完成。
以下是在处理请求时停止jetty服务器的测试:
使用Jetty 8.1.13.v20130916,测试通过:https://gist.github.com/anonymous/6930013
使用Jetty 9.0.6.v20130930,测试失败:https://gist.github.com/anonymous/6930002
唯一的区别是“Server#setGracefulShutdown”和“Server#setStopTimeout”。 我错过了什么吗?