Skip to content
This repository was archived by the owner on Apr 20, 2025. It is now read-only.

Commit f3b4b41

Browse files
refactor: return handler result in makeHandler and log disposal in ServerEventEmitter
1 parent 0ecdca6 commit f3b4b41

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/core/make-handler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ export function makeHandler<Body, Query, Params>(
5757
}
5858
}
5959

60-
await handler(req as Request<Params, unknown, Body, Query>, res, next);
60+
return handler(req as Request<Params, unknown, Body, Query>, res, next);
6161
};
6262
}

src/lib/sse/server-event-emitter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export class ServerEventEmitter {
2525

2626
public dispose() {
2727
this._stream.end();
28+
Logger.info(`disposed ServerEventEmitter with id ${this._id}`);
2829
}
2930

3031
// NOTE: keep this line if you are using the using keyword otherwise remove it
3132
public [Symbol.dispose]() {
3233
this.dispose();
33-
Logger.info(`disposed ServerEventEmitter with id ${this._id}`);
3434
}
3535
}

0 commit comments

Comments
 (0)