Skip to content

Commit

Permalink
Remove close
Browse files Browse the repository at this point in the history
  • Loading branch information
Ale Figueroa committed Mar 5, 2019
1 parent 1329b26 commit 450b794
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export interface YakTimeOpts {
export interface YakTimeServer {
(request: IncomingMessage, response: ServerResponse): void
hits?: Set<string>
close? (): Promise<void>
}

export function ensureIsValidStatusCode (res: IncomingMessage, opts: YakTimeOpts) {
Expand Down
15 changes: 1 addition & 14 deletions src/yaktime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@ export function yaktime (host: string, opts: YakTimeOpts): YakTimeServer {
}

yaktimeTape.hits = hits
yaktimeTape.close = async () => {
const db = await recorder.db

await new Promise(resolve => {
db.close(resolve)
})
await new Promise(resolve => {
db.saveDatabase(resolve)
})

return new Promise(resolve => {
recorder.proxy.close(resolve)
})
}

return yaktimeTape
}

0 comments on commit 450b794

Please sign in to comment.