Skip to content

Commit e076e9c

Browse files
committed
未知の RPC メソッドが offer に含まれていた場合はログ出力する
1 parent cdb6625 commit e076e9c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sora/PeerChannel.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,14 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
943943

944944
if let rpcMethods = offer.rpcMethods {
945945
rpcAllowedMethods = rpcMethods
946+
// 未知の RPC メソッドが含まれている場合はログ出力する
947+
for method in rpcMethods {
948+
if RPCMethod(name: method) == nil {
949+
Logger.warn(
950+
type: .peerChannel,
951+
message: "unknown RPC method received from server: \(method)")
952+
}
953+
}
946954
} else {
947955
rpcAllowedMethods = []
948956
}

0 commit comments

Comments
 (0)