Skip to content

Commit

Permalink
style: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Oct 4, 2023
1 parent 943341a commit ea8a383
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 16 deletions.
1 change: 0 additions & 1 deletion xmcl-keystone-ui/src/composables/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { Settings } from '@xmcl/runtime-api'
import { Ref } from 'vue'
import { Framework } from 'vuetify'
Expand Down
1 change: 0 additions & 1 deletion xmcl-keystone-ui/src/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

declare module '*.webp' {
const value: string
export default value
Expand Down
1 change: 0 additions & 1 deletion xmcl-runtime/lib/entities/gfw.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export class GFW {
inside = false

Expand Down
1 change: 0 additions & 1 deletion xmcl-runtime/lib/services/YggdrasilService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { YggdrasilService as IYggdrasilService, YggdrasilApi, YggdrasilSchema, YggdrasilServiceKey } from '@xmcl/runtime-api'
import { Pool } from 'undici'
import { YggdrasilAccountSystem } from '../accountSystems/YggdrasilAccountSystem'
Expand Down
22 changes: 10 additions & 12 deletions xmcl-runtime/lib/util/mapAndGetPortCanidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,17 @@ export async function mapLocalPort(natService: NatService, ip: string, priv: num
await Promise.all(mappings.map(n => natService.map(n)))
} catch (e) {
const err = e as any
if (err.detail?.UPnPError && err.detail?.UPnPError.errorCode === 501) {
// Table is full
const candidates = getUnmapCandidates(currentMappings, mappings)
console.log(candidates)
for (const c of candidates) {
if (!await natService.unmap(c)) {
debugger
}
}
await Promise.all(mappings.map(n => natService.map(n)))
} else {
throw e
if (err.detail?.UPnPError && err.detail?.UPnPError.errorCode === 501) {
// Table is full
const candidates = getUnmapCandidates(currentMappings, mappings)
console.log(candidates)
for (const c of candidates) {
await natService.unmap(c)
}
await Promise.all(mappings.map(n => natService.map(n)))
} else {
throw e
}
}
}

Expand Down

0 comments on commit ea8a383

Please sign in to comment.