Skip to content

Commit e5390dc

Browse files
authored
Merge pull request #34 from Hiram-Wong/main
fix: close server error
2 parents 9ebb116 + 1cdc457 commit e5390dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const start = async () => {
161161
// 停止服务
162162
const stop = async () => {
163163
try {
164-
await fastify.close(); // 关闭服务器
164+
await fastify.server.close(); // 关闭服务器
165165
console.log('Server stopped gracefully');
166166
} catch (err) {
167167
fastify.log.error('Error while stopping the server:', err);

0 commit comments

Comments
 (0)