perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

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

Retry proxy result reads after upstream closes

alice e125b423 7ba53f9d

+9 -1
+9 -1
lib/ATProto/PDS/ServiceProxy.pm
··· 149 149 next; 150 150 } 151 151 152 - my $res = $tx->result; 152 + my $res = eval { $tx->result }; 153 + if (my $err = $@) { 154 + my $message = "$err"; 155 + xrpc_error(502, 'UpstreamFailure', $message || 'Upstream service unreachable') 156 + if $attempt >= $attempts; 157 + select undef, undef, undef, 0.2 * $attempt; 158 + next; 159 + } 160 + 153 161 if (my $err = $res->error) { 154 162 if (!$res->code) { 155 163 xrpc_error(502, 'UpstreamFailure', $err->{message} // 'Upstream service unreachable')