We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dbfec28 + 1509ed7 commit c65c79bCopy full SHA for c65c79b
gormstroe.go
@@ -6,6 +6,8 @@ import (
6
7
"github.com/pkg/errors"
8
"gorm.io/gorm"
9
+
10
+ "github.com/quickfixgo/quickfix/config"
11
)
12
13
type gormStoreFactory struct {
@@ -24,8 +26,14 @@ type gromStore struct {
24
26
}
25
27
28
func (f gormStoreFactory) Create(sessionID SessionID) (msgStore MessageStore, err error) {
29
+ var dynamicSessions bool
30
+ if f.settings.GlobalSettings().HasSetting(config.DynamicSessions) {
31
+ if dynamicSessions, err = f.settings.globalSettings.BoolSetting(config.DynamicSessions); err != nil {
32
+ return
33
+ }
34
35
_, ok := f.settings.SessionSettings()[sessionID]
- if !ok {
36
+ if !ok && !dynamicSessions {
37
return nil, fmt.Errorf("unknown session: %v", sessionID)
38
39
0 commit comments