mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
added the log.warn for the ipc endpoint
This commit is contained in:
parent
1ff152f3a4
commit
ecb2ec9b06
1 changed files with 7 additions and 0 deletions
|
|
@ -23,10 +23,17 @@ import (
|
|||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
)
|
||||
|
||||
// ipcListen will create a Unix socket on the given endpoint.
|
||||
func ipcListen(endpoint string) (net.Listener, error) {
|
||||
if len(endpoint) > 107 {
|
||||
log.Warn("The ipc endpoint is longer than 107 characters and is restricted to this size by linux. "+
|
||||
"Shorten this path to less than 108 characters.", "endpoint", endpoint)
|
||||
}
|
||||
|
||||
// Ensure the IPC path exists and remove any previous leftover
|
||||
if err := os.MkdirAll(filepath.Dir(endpoint), 0751); err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Reference in a new issue