afterEnd method invoked in nextTick

This commit is contained in:
lichengyin 2015-12-25 19:08:50 +08:00
parent 903ce1ac39
commit 6d74db661c

View File

@ -696,7 +696,16 @@ export default class {
_end(){
this.cookie(true);
this.res.end();
process.nextTick(() => {
this._afterEnd();
});
}
/**
* after end
* @return {} []
*/
_afterEnd(){
//flush session
if(this._session && this._session.flush){
this._session.flush();