Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-socket-activation
Commits
9365a29d
Commit
9365a29d
authored
May 19, 2021
by
Marten Seemann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix staticcheck
parent
54a6b11d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
sockets.go
sockets.go
+0
-2
sockets_linux.go
sockets_linux.go
+3
-0
No files found.
sockets.go
View file @
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
)
...
...
sockets_linux.go
View file @
9365a29d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment