Skip to content

Commit 2c26a12

Browse files
committed
refactor(sse): reorganize struct
1 parent 7e9c707 commit 2c26a12

File tree

1 file changed

+1
-3
lines changed
  • apps/hermes/server/src/api/rest/v2

1 file changed

+1
-3
lines changed

apps/hermes/server/src/api/rest/v2/sse.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ where
103103
let start_time = Instant::now();
104104

105105
let sse_stream = stream
106-
.take_while(move |_| {
107-
start_time.elapsed() < MAX_CONNECTION_DURATION
108-
})
106+
.take_while(move |_| start_time.elapsed() < MAX_CONNECTION_DURATION)
109107
.then(move |message| {
110108
let state_clone = state.clone(); // Clone again to use inside the async block
111109
let price_ids_clone = price_ids.clone(); // Clone again for use inside the async block

0 commit comments

Comments
 (0)