Abort bunker on destroy
This commit is contained in:
parent
952ebd38bf
commit
bf6e1a854a
2 changed files with 6 additions and 1 deletions
|
|
@ -340,7 +340,7 @@ export const sendWrapped = async ({
|
||||||
uniq(pubkeys).map(async recipient =>
|
uniq(pubkeys).map(async recipient =>
|
||||||
publishThunk({
|
publishThunk({
|
||||||
event: await nip59.wrap(recipient, stamp(template)),
|
event: await nip59.wrap(recipient, stamp(template)),
|
||||||
relays: ctx.app.router.PublishMessage(recipient).getUrls(),
|
relays: ctx.app.router.PubkeyInbox(recipient).getUrls(),
|
||||||
delay,
|
delay,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import {onDestroy} from 'svelte'
|
||||||
import {Nip46Broker} from "@welshman/signer"
|
import {Nip46Broker} from "@welshman/signer"
|
||||||
import {nip46Perms, addSession} from "@welshman/app"
|
import {nip46Perms, addSession} from "@welshman/app"
|
||||||
import {slideAndFade} from '@lib/transition'
|
import {slideAndFade} from '@lib/transition'
|
||||||
|
|
@ -81,6 +82,10 @@
|
||||||
clearModals()
|
clearModals()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onDestroy(() => {
|
||||||
|
abortController.abort()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form class="column gap-4" on:submit|preventDefault={onSubmit}>
|
<form class="column gap-4" on:submit|preventDefault={onSubmit}>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue