aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/pss/ping.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/pss/ping.go')
-rw-r--r--swarm/pss/ping.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/swarm/pss/ping.go b/swarm/pss/ping.go
index 2ef072918..ff635f40a 100644
--- a/swarm/pss/ping.go
+++ b/swarm/pss/ping.go
@@ -19,6 +19,7 @@
package pss
import (
+ "context"
"errors"
"time"
@@ -40,7 +41,7 @@ type Ping struct {
InC chan bool // optional, report back to calling code
}
-func (p *Ping) pingHandler(msg interface{}) error {
+func (p *Ping) pingHandler(ctx context.Context, msg interface{}) error {
var pingmsg *PingMsg
var ok bool
if pingmsg, ok = msg.(*PingMsg); !ok {
@@ -80,7 +81,7 @@ func NewPingProtocol(ping *Ping) *p2p.Protocol {
for {
select {
case ispong := <-ping.OutC:
- pp.Send(&PingMsg{
+ pp.Send(context.TODO(), &PingMsg{
Created: time.Now(),
Pong: ispong,
})