Skip to content

Commit

Permalink
Merge pull request #41 from RTradeLtd/time
Browse files Browse the repository at this point in the history
Fix Occasionnal Pipe Closures
  • Loading branch information
postables committed Jun 22, 2019
2 parents 2e3973e + 5a7ba27 commit 7ba523c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions database.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package database
import (
"errors"
"fmt"
"time"

"github.com/RTradeLtd/config/v2"
"github.com/RTradeLtd/database/v2/models"
Expand Down Expand Up @@ -100,5 +101,6 @@ func openDBConnection(opts dbOptions) (*gorm.DB, error) {
if err != nil {
return nil, fmt.Errorf("failed to establish connection with database: %s", err.Error())
}
db.DB().SetConnMaxLifetime(time.Minute * 60)
return db, nil
}

0 comments on commit 7ba523c

Please sign in to comment.