Skip to content

Commit 00f6583

Browse files
committed
debug log を追加
1 parent 07cfc7f commit 00f6583

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sora/URLSessionWebSocketChannel.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class URLSessionWebSocketChannel: NSObject, URLSessionDelegate, URLSessionTaskDe
8484
internalHandlers.onDisconnectWithError?(self, error)
8585
}
8686

87+
Logger.debug(type: .webSocketChannel, message: "[\(host)] canceling")
8788
webSocketTask?.cancel(with: .normalClosure, reason: nil)
8889
urlSession?.invalidateAndCancel()
8990

@@ -201,10 +202,13 @@ class URLSessionWebSocketChannel: NSObject, URLSessionDelegate, URLSessionTaskDe
201202
didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
202203
reason: Data?
203204
) {
205+
Logger.debug(type: .webSocketChannel, message: "close frame received")
204206
guard !isClosing else {
205207
return
206208
}
207209

210+
Logger.debug(type: .webSocketChannel, message: "close frame received but not yet closing")
211+
208212
var message = "[\(host)] \(#function) closeCode => \(closeCode)"
209213

210214
let reasonString = reason2string(reason: reason)

0 commit comments

Comments
 (0)