to complex with reused connection
Some checks failed
Build and Publish / BuildAndDeploy (push) Has been cancelled
Some checks failed
Build and Publish / BuildAndDeploy (push) Has been cancelled
This commit is contained in:
@@ -108,7 +108,7 @@ func NewSyncedPool(local *GrainLocalPool, hostname string, d Discovery) (*Synced
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Printf("Got connection from %s", conn.RemoteAddr().Network())
|
log.Printf("Got connection from %s", conn.RemoteAddr().Network())
|
||||||
pool.AddRemoteWithConnection(conn.RemoteAddr().Network(), conn)
|
|
||||||
go pool.handleConnection(conn)
|
go pool.handleConnection(conn)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@@ -418,17 +418,6 @@ func (p *SyncedPool) OwnerChanged(id CartId, host string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *SyncedPool) AddRemoteWithConnection(address string, connection net.Conn) error {
|
|
||||||
pool := NewRemoteGrainPool(fmt.Sprintf(address, 1337))
|
|
||||||
remote := RemoteHost{
|
|
||||||
connection: connection,
|
|
||||||
queue: NewPacketQueue(connection),
|
|
||||||
Pool: pool,
|
|
||||||
Host: address,
|
|
||||||
}
|
|
||||||
return p.addRemoteHost(address, &remote)
|
|
||||||
}
|
|
||||||
|
|
||||||
func DoPing(host *RemoteHost) error {
|
func DoPing(host *RemoteHost) error {
|
||||||
SendPacket(host.connection, Ping, func(w io.Writer) error {
|
SendPacket(host.connection, Ping, func(w io.Writer) error {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user