diff --git a/core/install.go b/core/install.go index f482693..3c0dfb3 100644 --- a/core/install.go +++ b/core/install.go @@ -17,7 +17,7 @@ import ( // ./openp2p install -node hhd1207-222 -token YOUR-TOKEN -sharebandwidth 0 -peernode hhdhome-n1 -dstip 127.0.0.1 -dstport 50022 -protocol tcp -srcport 22 func install() { gLog.Println(LvINFO, "openp2p start. version: ", OpenP2PVersion) - gLog.Println(LvINFO, "Contact: QQ: 16947733, Email: openp2p.cn@gmail.com") + gLog.Println(LvINFO, "Contact: QQ group 16947733, Email openp2p.cn@gmail.com") gLog.Println(LvINFO, "install start") defer gLog.Println(LvINFO, "install end") // auto uninstall @@ -74,6 +74,7 @@ func install() { } else { gLog.Println(LvINFO, "start openp2p service ok.") } + gLog.Println(LvINFO, "Visit WebUI on https://console.openp2p.cn") } func installByFilename() { diff --git a/core/p2pnetwork.go b/core/p2pnetwork.go index 30dd76f..b61e296 100644 --- a/core/p2pnetwork.go +++ b/core/p2pnetwork.go @@ -64,12 +64,11 @@ func P2PNetworkInstance(config *NetworkConfig) *P2PNetwork { } func (pn *P2PNetwork) run() { - go pn.readLoop() go pn.autorunApp() heartbeatTimer := time.NewTicker(NetworkHeartbeatTime) for pn.running { select { - case <-heartbeatTimer.C: // TODO: deal with connect failed, no send hb + case <-heartbeatTimer.C: pn.write(MsgHeartbeat, 0, "") case <-pn.restartCh: @@ -488,7 +487,7 @@ func (pn *P2PNetwork) init() error { err = errors.New("get local ip failed") break } - + go pn.readLoop() pn.config.mac = getmac(pn.config.localIP) pn.config.os = getOsName() diff --git a/core/protocol.go b/core/protocol.go index f7957b7..5ac9f65 100644 --- a/core/protocol.go +++ b/core/protocol.go @@ -10,7 +10,7 @@ import ( "time" ) -const OpenP2PVersion = "3.5.0" +const OpenP2PVersion = "3.5.2" const ProducnName string = "openp2p" const LeastSupportVersion = "3.0.0" diff --git a/go.mod b/go.mod index 23909fb..3d0d367 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,6 @@ require ( github.com/nxadm/tail v1.4.8 // indirect github.com/onsi/ginkgo v1.16.4 // indirect golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - golang.org/x/mobile v0.0.0-20221020085226-b36e6246172e // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/tools v0.1.12 // indirect