修复日志噪音
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" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<title>AirShare Pro</title>
|
<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">
|
<link rel="stylesheet" crossorigin href="/assets/index-qzWUgf-t.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -1510,6 +1510,9 @@ function attachControlChannel(channel) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
channel.onerror = (error) => {
|
channel.onerror = (error) => {
|
||||||
|
if (isIgnorableRTCChannelError(error)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
console.error(error)
|
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() {
|
function teardownRealtimeTransport() {
|
||||||
incomingFileBuffers.clear()
|
incomingFileBuffers.clear()
|
||||||
if (currentRtcPeerId) {
|
if (currentRtcPeerId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user