Unverified Commit 935f8a53 authored by Marten Seemann's avatar Marten Seemann Committed by GitHub

Merge pull request #13 from libp2p/fix-staticcheck

fix staticcheck
parents 54a6b11d 9365a29d
......@@ -3,13 +3,11 @@ package sockets
import (
"sync"
logging "github.com/ipfs/go-log"
manet "github.com/multiformats/go-multiaddr-net"
)
var (
mu sync.Mutex
log = logging.Logger("socket-activation")
initFn = func() {}
initialized = false
listeners = make(map[string][]manet.Listener)
......
......@@ -9,9 +9,12 @@ import (
"syscall"
activation "github.com/coreos/go-systemd/v22/activation"
logging "github.com/ipfs/go-log"
manet "github.com/multiformats/go-multiaddr-net"
)
var log = logging.Logger("socket-activation")
func isListening(file *os.File) (bool, error) {
ret, err := syscall.GetsockoptInt(int(file.Fd()), syscall.SOL_SOCKET, syscall.SO_ACCEPTCONN)
return ret == 1, err
......
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