diff --git a/go/logic/streamer.go b/go/logic/streamer.go index dc40ca3b2..45864221f 100644 --- a/go/logic/streamer.go +++ b/go/logic/streamer.go @@ -10,6 +10,7 @@ import ( "fmt" "strings" "sync" + "sync/atomic" "time" "github.com/github/gh-ost/go/base" @@ -215,5 +216,8 @@ func (this *EventsStreamer) Close() (err error) { } func (this *EventsStreamer) Teardown() { + this.migrationContext.Log.Debugf("Tearing down...") this.db.Close() + this.Close() + atomic.StoreInt64(&this.migrationContext.CutOverCompleteFlag, 1) }