Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Fixed journaler #6

Merged
merged 1 commit into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func NewFetcher(config *Config, sess *session.Session, journaler *Journaler) *Fe
}

func (this *Fetcher) Run() (string, error) {
defer this.journaler.Close()
var err error
if len(this.config.Roles) > 0 {
for _, role := range this.config.Roles {
Expand Down
4 changes: 3 additions & 1 deletion journaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ func (this *Journaler) listen() {
}
this.journal.Flush()
case <-this.quitCh:
fmt.Println("Closing")
this.fd.Close()
this.wg.Done()
return
break
}
}

}