aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/comms/ipc.go
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2015-06-25 21:54:16 +0800
committerBas van Kervel <basvankervel@gmail.com>2015-06-25 21:54:16 +0800
commit662285074e55a3915f7236a04fec355c3f416eb8 (patch)
tree87f24d50fa75351444a5992cb319cf565695b2a5 /rpc/comms/ipc.go
parent5757a0edb59f854433d11982b2ba4831cceb167e (diff)
downloadgo-tangerine-662285074e55a3915f7236a04fec355c3f416eb8.tar.gz
go-tangerine-662285074e55a3915f7236a04fec355c3f416eb8.tar.zst
go-tangerine-662285074e55a3915f7236a04fec355c3f416eb8.zip
improved logging for IPC connection lifetime management
Diffstat (limited to 'rpc/comms/ipc.go')
-rw-r--r--rpc/comms/ipc.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/rpc/comms/ipc.go b/rpc/comms/ipc.go
index 3cfcbf3cf..f3dda5581 100644
--- a/rpc/comms/ipc.go
+++ b/rpc/comms/ipc.go
@@ -2,6 +2,7 @@ package comms
import (
"fmt"
+ "math/rand"
"net"
"encoding/json"
@@ -95,3 +96,7 @@ func NewIpcClient(cfg IpcConfig, codec codec.Codec) (*ipcClient, error) {
func StartIpc(cfg IpcConfig, codec codec.Codec, offeredApi shared.EthereumApi) error {
return startIpc(cfg, codec, offeredApi)
}
+
+func newIpcConnId() int {
+ return rand.Int() % 1000000
+}