Don't start model until services have been added (fixes #1969)

This commit is contained in:
Jakob Borg
2015-06-20 20:04:47 +02:00
parent b5198d8119
commit d347e54acb
4 changed files with 18 additions and 12 deletions

View File

@@ -179,6 +179,7 @@ func (m *Model) StartFolderRW(folder string) {
if !ok {
l.Fatalf("Requested versioning type %q that does not exist", cfg.Versioning.Type)
}
versioner := factory(folder, cfg.Path(), cfg.Versioning.Params)
if service, ok := versioner.(suture.Service); ok {
// The versioner implements the suture.Service interface, so
@@ -189,7 +190,7 @@ func (m *Model) StartFolderRW(folder string) {
p.versioner = versioner
}
go p.Serve()
m.Add(p)
}
// StartFolderRO starts read only processing on the current model. When in