[#330] 네트워크가 연결되어있음에도 앱을 시작할 시 간헐적으로 네트워크 관련 얼럿이 뜨는 현상을 해결한다#333
Merged
[#330] 네트워크가 연결되어있음에도 앱을 시작할 시 간헐적으로 네트워크 관련 얼럿이 뜨는 현상을 해결한다#333
Conversation
Owner
opficdev
commented
Mar 29, 2026
- closed 네트워크가 연결되어있음에도 앱을 시작할 시 간헐적으로 네트워크 관련 얼럿이 뜨는 현상을 해결한다 #330
| func observeNetworkConnectivity() -> AnyPublisher<Bool, Never> { | ||
| isConnectedSubject.eraseToAnyPublisher() | ||
| isConnectedSubject | ||
| .compactMap { $0 } |
Contributor
There was a problem hiding this comment.
네트워크 연결 상태가 변경될 때만 이벤트를 방출하도록 removeDuplicates() 연산자를 추가하는 것을 고려해 보세요. pathUpdateHandler는 연결 상태(status)가 동일하더라도 다른 경로 속성(예: 사용 가능한 인터페이스 변경)이 변경될 때마다 호출될 수 있습니다. removeDuplicates()를 사용하면 불필요한 중복 true 또는 false 값의 전송을 막아 다운스트림 구독자의 부하를 줄일 수 있습니다.
Suggested change
| .compactMap { $0 } | |
| .compactMap { $0 } | |
| .removeDuplicates() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.