fix worker reconnect errors, send cando after reconnection.

* fix worker reconnect errors, send cando after reconnection.
This commit is contained in:
Sadlil Rhythom 2017-01-27 17:32:20 +06:00 committed by Christoffer Fjellström
parent 2fba865e37
commit 5c665de2d6

View File

@ -159,8 +159,9 @@ func (a *agent) reconnect() error {
a.conn = conn
a.rw = bufio.NewReadWriter(bufio.NewReader(a.conn),
bufio.NewWriter(a.conn))
a.grab()
a.worker.reRegisterFuncsForAgent(a)
a.grab()
go a.work()
return nil