Skip to content

Commit

Permalink
fix: message timer leak
Browse files Browse the repository at this point in the history
  • Loading branch information
whatwewant committed Feb 7, 2024
1 parent f179c36 commit 12b795b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func CreateMessageCommand(
return
}
})
defer answerTimeout.Stop()

conversation, err := chatgptClient.GetOrCreateConversation(request.ChatID(), &chatgpt.ConversationConfig{
MaxMessages: 50,
Expand Down Expand Up @@ -179,7 +180,6 @@ func CreateMessageCommand(
}
return
}
answerTimeout.Stop()

logger.Debugf("ChatGPT 答 %s:%s", user.User.Name, answer)

Expand Down

0 comments on commit 12b795b

Please sign in to comment.