fix
This commit is contained in:
parent
de7d38c596
commit
52f3af0758
@ -283,6 +283,11 @@ public final class XtreamPlayerApplication {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (Exception candidateException) {
|
} catch (Exception candidateException) {
|
||||||
|
if (candidateException instanceof InterruptedException) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
writeJson(exchange, 500, errorJson("Stream proxy interrupted."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
attemptErrors.add(maskUri(candidate) + " -> " + compactError(candidateException));
|
attemptErrors.add(maskUri(candidate) + " -> " + compactError(candidateException));
|
||||||
LOGGER.warn("Stream proxy candidate failed uri={}", maskUri(candidate), candidateException);
|
LOGGER.warn("Stream proxy candidate failed uri={}", maskUri(candidate), candidateException);
|
||||||
}
|
}
|
||||||
@ -317,9 +322,6 @@ public final class XtreamPlayerApplication {
|
|||||||
copyResponseHeaderIfPresent(response, exchange, "Expires");
|
copyResponseHeaderIfPresent(response, exchange, "Expires");
|
||||||
exchange.getResponseHeaders().set("Content-Type", contentType);
|
exchange.getResponseHeaders().set("Content-Type", contentType);
|
||||||
writeBytes(exchange, response.statusCode(), body, contentType);
|
writeBytes(exchange, response.statusCode(), body, contentType);
|
||||||
} catch (InterruptedException interruptedException) {
|
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
writeJson(exchange, 500, errorJson("Stream proxy interrupted."));
|
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
LOGGER.error("Stream proxy failed for {}", maskUri(target), exception);
|
LOGGER.error("Stream proxy failed for {}", maskUri(target), exception);
|
||||||
writeJson(exchange, 502, errorJson("Unable to proxy stream: " + exception.getMessage()));
|
writeJson(exchange, 502, errorJson("Unable to proxy stream: " + exception.getMessage()));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user