diff options
Diffstat (limited to 'node')
-rw-r--r-- | node/node.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/node/node.go b/node/node.go index f4c7d8c72..ff2244503 100644 --- a/node/node.go +++ b/node/node.go @@ -34,7 +34,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rpc" - "github.com/prometheus/prometheus/util/flock" + "github.com/prometheus/tsdb/fileutil" ) // Node is a container on which services can be registered. @@ -43,8 +43,8 @@ type Node struct { config *Config accman *accounts.Manager - ephemeralKeystore string // if non-empty, the key directory that will be removed by Stop - instanceDirLock flock.Releaser // prevents concurrent use of instance directory + ephemeralKeystore string // if non-empty, the key directory that will be removed by Stop + instanceDirLock fileutil.Releaser // prevents concurrent use of instance directory serverConfig p2p.Config server *p2p.Server // Currently running P2P networking layer @@ -267,7 +267,7 @@ func (n *Node) openDataDir() error { } // Lock the instance directory to prevent concurrent use by another instance as well as // accidental use of the instance directory as a database. - release, _, err := flock.New(filepath.Join(instdir, "LOCK")) + release, _, err := fileutil.Flock(filepath.Join(instdir, "LOCK")) if err != nil { return convertFileLockError(err) } |