Skip to content

fix: prevent DJ enqueue from resetting active playback state#152

Merged
LivingLikeKrillin merged 1 commit intodevelopfrom
fix/dj-queue-500-error
Mar 29, 2026
Merged

fix: prevent DJ enqueue from resetting active playback state#152
LivingLikeKrillin merged 1 commit intodevelopfrom
fix/dj-queue-500-error

Conversation

@LivingLikeKrillin
Copy link
Copy Markdown
Contributor

Summary

  • DJ enqueue 시 activate(null, null) 호출이 기존 활성 playback 상태를 덮어쓰는 문제 수정
  • getDjQueueInfo에서 currentPlaybackId null 방어 처리 추가

Root Cause

enqueueDj()가 무조건 activate(null, null)을 호출하여, 두 번째 DJ 등록 시 currentPlaybackId가 null로 초기화됨 → GET /dj-queue 500 에러 (NPE)

Test plan

  • :app:compileJava 빌드 성공
  • DjCommandService* 테스트 통과
  • PartyroomQueryServiceTest 테스트 통과

🤖 Generated with Claude Code

enqueueDj() unconditionally called activate(null, null), overwriting
currentPlaybackId when a second DJ registered during active playback.
This caused NPE (500) on GET /dj-queue and any playbackId-dependent query.

- Move activate(null, null) inside isPostActivationProcessingRequired guard
- Add null check on currentPlaybackId in getDjQueueInfo for transient state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@LivingLikeKrillin LivingLikeKrillin merged commit 0b7849f into develop Mar 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant