Skip to content

Commit c7a82ce

Browse files
committed
inject attribute is only set once for a track, so don't remove it
1 parent 4ddd8a3 commit c7a82ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/main/java/dev/lavalink/youtube/http/YoutubeHttpContextFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void onRequest(HttpClientContext context,
109109

110110
if (isRequestFromOauthedClient && Client.PLAYER_URL.equals(request.getURI().toString())) {
111111
// Look at the userdata for any provided oauth-token
112-
String oauthToken = (String) context.removeAttribute(OAUTH_INJECT_CONTEXT_ATTRIBUTE);
112+
String oauthToken = context.getAttribute(OAUTH_INJECT_CONTEXT_ATTRIBUTE, String.class);
113113
// only apply the token to /player requests.
114114
if (oauthToken != null && !oauthToken.isEmpty()) {
115115
oauth2Handler.applyToken(request, oauthToken);

0 commit comments

Comments
 (0)