File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1199,13 +1199,19 @@ impl TransportT for SolanaTransport {
11991199 let game_account_pubkey = Self :: parse_pubkey ( addr) ?;
12001200 let addr = addr. to_owned ( ) ;
12011201
1202- let client = match PubsubClient :: new ( & ws_rpc) . await {
1203- Ok ( client) => client,
1204- Err ( e) => {
1205- error ! ( "Failed to create PubsubClient due to {:?}" , e) ;
1206- return Err ( Error :: TransportError ( e. to_string ( ) ) ) ;
1207- }
1208- } ;
1202+ let client;
1203+ loop {
1204+ match PubsubClient :: new ( & ws_rpc) . await {
1205+ Ok ( c) => {
1206+ client = c;
1207+ break ;
1208+ }
1209+ Err ( e) => {
1210+ error ! ( "Failed to create PubsubClient due to {:?}, will retry." , e) ;
1211+ tokio:: time:: sleep ( Duration :: from_secs ( 10 ) ) . await ;
1212+ }
1213+ } ;
1214+ }
12091215
12101216 Ok ( Box :: pin ( stream ! {
12111217 let ( mut stream, unsub) = match client
You can’t perform that action at this time.
0 commit comments