cleaning up socket file
This commit is contained in:
parent
0d62f362b7
commit
dd1ef29dac
@ -399,6 +399,8 @@ func (this *Migrator) Migrate() (err error) {
|
||||
if err := this.initiateServer(); err != nil {
|
||||
return err
|
||||
}
|
||||
defer this.server.RemoveSocketFile()
|
||||
|
||||
if this.migrationContext.CountTableRows {
|
||||
if this.migrationContext.Noop {
|
||||
log.Debugf("Noop operation; not really counting table rows")
|
||||
|
@ -47,6 +47,10 @@ func (this *Server) BindSocketFile() (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *Server) RemoveSocketFile() (err error) {
|
||||
return os.Remove(this.migrationContext.ServeSocketFile)
|
||||
}
|
||||
|
||||
func (this *Server) BindTCPPort() (err error) {
|
||||
if this.migrationContext.ServeTCPPort == 0 {
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user