File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -110,13 +110,12 @@ def dispatch(self):
110110
111111 # the dispatch is flagged as asynchronous by default so we make sure the finish method will be called
112112 # unless the result of the callback is a Future
113-
114113 if isinstance (result , Future ):
115114 IOLoop .current ().add_future (result , self .finish )
116115 return
117116
118117 if not self .is_finish ():
119- self .finish ()
118+ self .finish (result = result )
120119
121120 def prepare (self ):
122121 self .event_dispatcher .dispatch ('handler.request' , {
@@ -125,9 +124,15 @@ def prepare(self):
125124 })
126125
127126 def finish (self , * args , ** kwargs ):
127+
128+ result = None
129+ if 'result' in kwargs :
130+ result = kwargs ['result' ]
131+
128132 self .event_dispatcher .dispatch ('handler.response' , {
129133 'request_handler' : self ,
130134 'request' : self .request ,
135+ 'result' : result
131136 })
132137
133138 super (RouterHandler , self ).finish ()
You can’t perform that action at this time.
0 commit comments