Skip to content

Commit

Permalink
fix: SSE 알림 전송 실패시 예외처리 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ah9mon committed Oct 5, 2023
1 parent 0f6d744 commit 3a80fa1
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import com.siliconvalley.domain.sse.code.SseCode;
import com.siliconvalley.domain.sse.repository.SseEmitterRepository;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.io.IOException;

@Component
@Slf4j
@RequiredArgsConstructor
public class SseEmitterSender {

Expand All @@ -24,13 +26,7 @@ public void send(SseEmitter sseEmitter, String id, Object data, Long profileId,

} catch (IOException exception) {
sseEmitterRepository.delete(profileId);
throw new RuntimeException(SseCode.CONNECT_FAIL.getMessage());
log.info(SseCode.CONNECT_FAIL.getMessage());
}
}

public void sendNotReceivedEvent(String lastEventId) {

}


}

0 comments on commit 3a80fa1

Please sign in to comment.