Skip to content

Commit 4f1d44e

Browse files
authored
Loop the generator to continue yeilding values (aws#220)
1 parent 3fa8df3 commit 4f1d44e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lambda/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,10 @@ where
183183

184184
fn incoming(client: &Client) -> impl Stream<Item = Result<http::Response<hyper::Body>, Error>> + '_ {
185185
gen!({
186-
let req = NextEventRequest.into_req().expect("Unable to construct request");
187-
yield_!(client.call(req).await)
186+
loop {
187+
let req = NextEventRequest.into_req().expect("Unable to construct request");
188+
yield_!(client.call(req).await)
189+
}
188190
})
189191
}
190192

0 commit comments

Comments
 (0)