Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1bcad43

Browse files
committed
fix: re-init connection on reset (platform#260)
1 parent 2fbaaae commit 1bcad43

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎pkg/bot/command/reset_session.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ func ResetSession(ctx context.Context, cmd *platform.Command, msg *models.Messag
5050
idleConnection.Release()
5151
}
5252

53+
cloneConn, err := session.Pool.Acquire(ctx)
54+
if err != nil {
55+
log.Err("failed to acquire database connection:", err)
56+
}
57+
58+
if cloneConn != nil {
59+
session.CloneConnection = cloneConn.Conn()
60+
}
61+
5362
fwData := &foreword.Content{
5463
SessionID: clone.ID,
5564
Duration: time.Duration(clone.Metadata.MaxIdleMinutes) * time.Minute,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /