Merge pull request #877 from jongiddy/guide-save-receiver
Fix guide example to save receiver for later use by response handler.
This commit is contained in:
		| @@ -314,7 +314,9 @@ impl Handler<Http> for Text { | |||||||
|             "/question" => { |             "/question" => { | ||||||
|                 let (tx, rx) = mpsc::channel(); |                 let (tx, rx) = mpsc::channel(); | ||||||
|                 // queue work on our worker |                 // queue work on our worker | ||||||
|                 self.worker_tx.send((self.control.take().unwrap(), tx)); |                 self.worker_tx.send((self.control.take().unwrap(), tx)).unwrap(); | ||||||
|  |                 // save receive channel for response handling | ||||||
|  |                 self.worker_rx = Some(rx); | ||||||
|                 // tell hyper we need to wait until we can continue |                 // tell hyper we need to wait until we can continue | ||||||
|                 return Next::wait(); |                 return Next::wait(); | ||||||
|             } |             } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user