File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,10 @@ impl Client {
285285 batch. push ( sub) ;
286286 }
287287 if !batch. is_empty ( ) {
288+ log:: debug!(
289+ "Client::listen_txs() last_request = {:?}" ,
290+ batch. len( )
291+ ) ;
288292 last_request = Some ( batch. clone ( ) ) ;
289293 // TODO: do not unwrap
290294 self . inner . try_send_batch ( batch. iter ( ) . collect ( ) ) . unwrap ( ) ;
@@ -302,6 +306,10 @@ impl Client {
302306 batch. push ( history) ;
303307 }
304308 if !batch. is_empty ( ) {
309+ log:: debug!(
310+ "Client::listen_txs() last_request = {:?}" ,
311+ batch. len( )
312+ ) ;
305313 last_request = Some ( batch. clone ( ) ) ;
306314 // TODO: do not unwrap
307315 self . inner . try_send_batch ( batch. iter ( ) . collect ( ) ) . unwrap ( ) ;
@@ -316,6 +324,10 @@ impl Client {
316324 batch. push ( tx) ;
317325 }
318326 if !batch. is_empty ( ) {
327+ log:: debug!(
328+ "Client::listen_txs() last_request = {:?}" ,
329+ batch. len( )
330+ ) ;
319331 last_request = Some ( batch. clone ( ) ) ;
320332 // TODO: do not unwrap
321333 self . inner . try_send_batch ( batch. iter ( ) . collect ( ) ) . unwrap ( ) ;
@@ -349,6 +361,12 @@ impl Client {
349361 } ;
350362 if r_match {
351363 last_request = None ;
364+ } else if let Some ( last_req) = & last_request {
365+ log:: debug!( "Client::listen_txs() request not match resend last request" ) ;
366+ thread:: sleep ( Duration :: from_millis ( 100 ) ) ;
367+ self . inner
368+ . try_send_batch ( last_req. iter ( ) . collect ( ) )
369+ . unwrap ( ) ;
352370 }
353371
354372 log:: debug!( "Client::listen_txs() from electrum: {r:#?}" ) ;
You can’t perform that action at this time.
0 commit comments