Skip to content

Commit

Permalink
refactor: Capture NatService initialize error
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Dec 9, 2023
1 parent 248192c commit a273967
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xmcl-runtime/lib/services/NatService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export class NatService extends StatefulService<NatState> implements INatService

constructor(@Inject(LauncherAppKey) app: LauncherApp) {
super(app, () => new NatState(), async () => {
this.refreshNatType()
this.refreshNatType().catch((e) => {
this.warn('Failed to get nat type: %o', e)
})

try {
const ssdp = await createSsdp()
Expand Down

0 comments on commit a273967

Please sign in to comment.