Commit 455241de authored by obscuren's avatar obscuren

Removed goroutine from "Run"

parent db89c3e1
...@@ -2,6 +2,7 @@ package eth ...@@ -2,6 +2,7 @@ package eth
import ( import (
"bytes" "bytes"
"fmt"
"math" "math"
"math/big" "math/big"
...@@ -98,15 +99,14 @@ func runEthProtocol(txPool txPool, chainManager chainManager, blockPool blockPoo ...@@ -98,15 +99,14 @@ func runEthProtocol(txPool txPool, chainManager chainManager, blockPool blockPoo
} }
err = self.handleStatus() err = self.handleStatus()
if err == nil { if err == nil {
go func() { for {
for { err = self.handle()
err = self.handle() if err != nil {
if err != nil { fmt.Println(err)
self.blockPool.RemovePeer(self.id) self.blockPool.RemovePeer(self.id)
break break
}
} }
}() }
} }
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment