Skip to content

Commit

Permalink
Merge branch 'graceful-restarts' of https://github.com/jonas747/yagpdb
Browse files Browse the repository at this point in the history
…into graceful-restarts
  • Loading branch information
jogramming committed Jul 11, 2018
2 parents bcbf7b5 + 92c10a2 commit 08426bb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions bot/discordevents.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func setWaitingGuildReady(g int64) {
stateLock.Lock()
currentState := state
stateLock.Unlock()

if currentState == StateSoftStarting {
SlaveClient.Send(master.EvtSoftStartComplete, nil, true)
}
Expand Down
1 change: 0 additions & 1 deletion master/slave/slave.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func (c *Conn) TryReconnect(running bool) bool {
}

func (c *Conn) HandleMessage(m *master.Message) {

dataInterfaceF, ok := master.EvtDataMap[m.EvtID]
var dataInterface interface{}
if ok {
Expand Down
3 changes: 0 additions & 3 deletions master/slaveconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func NewSlaveConn(netConn net.Conn) *SlaveConn {
}
mu.Unlock()
}

return sc
}

Expand Down Expand Up @@ -57,7 +56,6 @@ func (s *SlaveConn) HandleMessage(msg *Message) {
case EvtSlaveHello:
hello := dataInterface.(*SlaveHelloData)
s.HandleHello(hello)

// Full slave migration with shard rescaling not implemented yet
// case EvtSoftStartComplete:
// go mainSlave.Conn.Send(EvtShutdown, nil)
Expand Down Expand Up @@ -103,7 +101,6 @@ func (s *SlaveConn) HandleMessage(msg *Message) {
newSlave.Conn.Send(EvtGuildState, dataInterface)

}

}

func (s *SlaveConn) HandleHello(hello *SlaveHelloData) {
Expand Down

0 comments on commit 08426bb

Please sign in to comment.