Compare commits
2 Commits
9b75b872ee
...
b5475fa6c5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5475fa6c5 | ||
|
|
f45c40a1f2 |
@@ -46,7 +46,7 @@ func (g *RemoteGrain) Connect() error {
|
|||||||
if !strings.Contains(addr, ":") {
|
if !strings.Contains(addr, ":") {
|
||||||
addr = fmt.Sprintf("%s:1337", addr)
|
addr = fmt.Sprintf("%s:1337", addr)
|
||||||
}
|
}
|
||||||
log.Println("Connecting to", addr)
|
log.Printf("Connecting to %s %s", addr, g.Address)
|
||||||
client, err := net.Dial("tcp", addr)
|
client, err := net.Dial("tcp", addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ func NewSyncedPool(local *GrainLocalPool, hostname string, d Discovery) (*Synced
|
|||||||
if d != nil {
|
if d != nil {
|
||||||
go func() {
|
go func() {
|
||||||
for range time.Tick(time.Second * 5) {
|
for range time.Tick(time.Second * 5) {
|
||||||
log.Printf("Looking for new nodes")
|
|
||||||
hosts, err := d.Discover()
|
hosts, err := d.Discover()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error discovering hosts: %v", err)
|
log.Printf("Error discovering hosts: %v", err)
|
||||||
@@ -485,7 +484,7 @@ func (p *SyncedPool) AddRemote(address string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
pool := NewRemoteGrainPool(fmt.Sprintf(address, 1337))
|
pool := NewRemoteGrainPool(address)
|
||||||
remote := RemoteHost{
|
remote := RemoteHost{
|
||||||
connection: connection,
|
connection: connection,
|
||||||
queue: NewPacketQueue(connection),
|
queue: NewPacketQueue(connection),
|
||||||
|
|||||||
Reference in New Issue
Block a user