very fast at protocol indexer with flexible filtering, xrpc queries, cursor-backed event stream, and more, built on fjall
rust fjall at-protocol atproto indexer
58
fork

Configure Feed

Select the types of activity you want to include in your feed.

[firehose] if we cant resolve host its throttle worthy

dawn 2a2e6424 d392b479

+5 -14
+5 -14
src/ingest/firehose.rs
··· 24 24 } 25 25 26 26 match e { 27 - WsError::Rustls(e) => { 28 - if matches!(e, rustls::Error::InvalidCertificate(_)) { 29 - return true; 30 - } 31 - } 32 - WsError::Io(io_err) => { 33 - if is_tls_cert_error(io_err) { 34 - return true; 35 - } 36 - } 27 + WsError::Rustls(e) if matches!(e, rustls::Error::InvalidCertificate(_)) => return true, 28 + WsError::Io(io_err) if is_tls_cert_error(io_err) => return true, 29 + WsError::CannotResolveHost => return true, 37 30 WsError::Upgrade(tokio_websockets::upgrade::Error::DidNotSwitchProtocols(status)) => { 38 31 return matches!( 39 32 *status, ··· 45 38 | 404 // NOT FOUND 46 39 ); 47 40 } 41 + WsError::Protocol(_) | WsError::PayloadTooLong { .. } => return true, 48 42 _ => {} 49 43 } 50 44 ··· 58 52 src = s.source(); 59 53 } 60 54 61 - matches!( 62 - e, 63 - WsError::Io(_) | WsError::Protocol(_) | WsError::PayloadTooLong { .. } 64 - ) 55 + false 65 56 } 66 57 67 58 pub struct FirehoseIngestor {