@@ -42,14 +42,14 @@ enum SseTransportState {
4242}
4343
4444#[ derive( Debug , Clone , Copy , Hash , PartialEq , Eq ) ]
45- pub struct SseTransportRetryCofnig {
45+ pub struct SseTransportRetryConfig {
4646 pub max_times : Option < usize > ,
4747 pub min_duration : Duration ,
4848}
49- impl SseTransportRetryCofnig {
49+ impl SseTransportRetryConfig {
5050 pub const DEFAULT_MIN_DURATION : Duration = Duration :: from_millis ( 1000 ) ;
5151}
52- impl Default for SseTransportRetryCofnig {
52+ impl Default for SseTransportRetryConfig {
5353 fn default ( ) -> Self {
5454 Self {
5555 max_times : None ,
@@ -69,10 +69,10 @@ pub struct SseTransport {
6969 post_url : Arc < Url > ,
7070 sse_url : Arc < Url > ,
7171 last_event_id : Option < String > ,
72- recommanded_retry_duration_ms : Option < u64 > ,
72+ recommended_retry_duration_ms : Option < u64 > ,
7373 #[ allow( clippy:: type_complexity) ]
7474 request_queue : VecDeque < tokio:: sync:: oneshot:: Receiver < Result < ( ) , SseTransportError > > > ,
75- pub retry_config : SseTransportRetryCofnig ,
75+ pub retry_config : SseTransportRetryConfig ,
7676}
7777
7878impl SseTransport {
@@ -140,7 +140,7 @@ impl SseTransport {
140140 state : SseTransportState :: Connected ( Box :: pin ( event_stream) ) ,
141141 post_url : Arc :: from ( post_url) ,
142142 last_event_id,
143- recommanded_retry_duration_ms : retry,
143+ recommended_retry_duration_ms : retry,
144144 sse_url : Arc :: from ( url) ,
145145 request_queue : Default :: default ( ) ,
146146 retry_config : Default :: default ( ) ,
@@ -152,11 +152,11 @@ impl SseTransport {
152152 ) -> BoxFuture < ' static , Result < BoxStream < ' static , Result < Sse , SseError > > , SseTransportError > >
153153 {
154154 let retry_duration = {
155- let recommanded_retry_duration = self
156- . recommanded_retry_duration_ms
155+ let recommended_retry_duration = self
156+ . recommended_retry_duration_ms
157157 . map ( Duration :: from_millis) ;
158158 let config_retry_duration = self . retry_config . min_duration ;
159- recommanded_retry_duration
159+ recommended_retry_duration
160160 . map ( |d| d. max ( config_retry_duration) )
161161 . unwrap_or ( config_retry_duration)
162162 } ;
@@ -203,7 +203,7 @@ impl Stream for SseTransport {
203203 match event {
204204 Some ( Ok ( event) ) => {
205205 if let Some ( retry) = event. retry {
206- self . recommanded_retry_duration_ms = Some ( retry) ;
206+ self . recommended_retry_duration_ms = Some ( retry) ;
207207 }
208208 if let Some ( id) = event. id {
209209 self . last_event_id = Some ( id) ;
0 commit comments