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-p2p-kad-dht
Commits
04bb4705
Commit
04bb4705
authored
Apr 09, 2020
by
Alan Shaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: full stops
parent
392c0c77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dht_net.go
dht_net.go
+1
-1
events.go
events.go
+2
-2
No files found.
dht_net.go
View file @
04bb4705
...
...
@@ -25,7 +25,7 @@ import (
var
dhtReadMessageTimeout
=
10
*
time
.
Second
var
dhtStreamIdleTimeout
=
1
*
time
.
Minute
// ErrReadTimeout is an error that occurs when no message is read within the timeout period
// ErrReadTimeout is an error that occurs when no message is read within the timeout period
.
var
ErrReadTimeout
=
fmt
.
Errorf
(
"timed out reading response"
)
// The Protobuf writer performs multiple small writes when writing a message.
...
...
events.go
View file @
04bb4705
...
...
@@ -135,7 +135,7 @@ type LookupTerminateEvent struct {
Reason
LookupTerminationReason
}
// NewLookupTerminateEvent creates a new lookup termination event with a given reason
// NewLookupTerminateEvent creates a new lookup termination event with a given reason
.
func
NewLookupTerminateEvent
(
reason
LookupTerminationReason
)
*
LookupTerminateEvent
{
return
&
LookupTerminateEvent
{
Reason
:
reason
}
}
...
...
@@ -143,7 +143,7 @@ func NewLookupTerminateEvent(reason LookupTerminationReason) *LookupTerminateEve
// LookupTerminationReason captures reasons for terminating a lookup.
type
LookupTerminationReason
int
// MarshalJSON returns the JSON encoding of the passed lookup termination reason
// MarshalJSON returns the JSON encoding of the passed lookup termination reason
.
func
(
r
LookupTerminationReason
)
MarshalJSON
()
([]
byte
,
error
)
{
return
json
.
Marshal
(
r
.
String
())
}
...
...
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