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-tcp-transport
Commits
00f5995e
Unverified
Commit
00f5995e
authored
Apr 04, 2019
by
Steven Allen
Committed by
GitHub
Apr 04, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #38 from libp2p/fix/remove-inline-interface
chore: remove inline interface
parents
42717ef3
cb705a28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tcp.go
tcp.go
+4
-2
No files found.
tcp.go
View file @
00f5995e
...
...
@@ -23,9 +23,11 @@ var log = logging.Logger("tcp-tpt")
// try to set linger on the connection, if possible.
func
tryLinger
(
conn
net
.
Conn
,
sec
int
)
{
if
lingerConn
,
ok
:=
conn
.
(
interface
{
type
canLinger
interface
{
SetLinger
(
int
)
error
});
ok
{
}
if
lingerConn
,
ok
:=
conn
.
(
canLinger
);
ok
{
_
=
lingerConn
.
SetLinger
(
sec
)
}
}
...
...
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