log who owns it
This commit is contained in:
@@ -18,7 +18,6 @@ const CurrentPacketVersion = 2
|
||||
type CartListener map[CartId]Listener
|
||||
|
||||
func NewCartPacketQueue(connection *PersistentConnection) *CartPacketQueue {
|
||||
|
||||
queue := &CartPacketQueue{
|
||||
expectedPackages: make(map[CartMessage]*CartListener),
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ func (p *SyncedPool) RemoveRemoteGrain(id CartId) {
|
||||
|
||||
func (p *SyncedPool) SpawnRemoteGrain(id CartId, host string) {
|
||||
if p.local.grains[id] != nil {
|
||||
log.Printf("Grain %s already exists locally, deleting\n", id)
|
||||
log.Printf("Grain %s already exists locally, exists on (%s)\n", id, host)
|
||||
p.mu.Lock()
|
||||
delete(p.local.grains, id)
|
||||
p.mu.Unlock()
|
||||
@@ -395,10 +395,8 @@ func (p *SyncedPool) AddRemote(host string) error {
|
||||
}()
|
||||
go func() {
|
||||
for range time.Tick(time.Second * 3) {
|
||||
var err error
|
||||
err := remote.Ping()
|
||||
|
||||
err = remote.Ping()
|
||||
if err != nil {
|
||||
for err != nil {
|
||||
time.Sleep(time.Millisecond * 200)
|
||||
err = remote.Ping()
|
||||
@@ -409,7 +407,6 @@ func (p *SyncedPool) AddRemote(host string) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
return p.addRemoteHost(host, &remote)
|
||||
|
||||
Reference in New Issue
Block a user