修复日志噪音
This commit is contained in:
File diff suppressed because one or more lines are too long
2
frontend/dist/index.html
vendored
2
frontend/dist/index.html
vendored
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<title>AirShare Pro</title>
|
||||
<script type="module" crossorigin src="/assets/index-Dvss27fc.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CRoLf1mj.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-qzWUgf-t.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1510,6 +1510,9 @@ function attachControlChannel(channel) {
|
||||
}
|
||||
|
||||
channel.onerror = (error) => {
|
||||
if (isIgnorableRTCChannelError(error)) {
|
||||
return
|
||||
}
|
||||
console.error(error)
|
||||
}
|
||||
|
||||
@@ -1522,6 +1525,19 @@ function attachControlChannel(channel) {
|
||||
}
|
||||
}
|
||||
|
||||
function isIgnorableRTCChannelError(event) {
|
||||
const reason = String(event?.error?.message || event?.error?.reason || event?.message || '').toLowerCase()
|
||||
if (!reason) {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
reason.includes('user-initiated abort') ||
|
||||
reason.includes('close called') ||
|
||||
reason.includes('data channel is closed')
|
||||
)
|
||||
}
|
||||
|
||||
function teardownRealtimeTransport() {
|
||||
incomingFileBuffers.clear()
|
||||
if (currentRtcPeerId) {
|
||||
|
||||
Reference in New Issue
Block a user