Fix logging net.Dial() errors

We didn't plumb net15 yet here.
pull/71/head
Eugene Kim 6 years ago
parent 8ba4f7ac5d
commit 6a114e86c5
  1. 3
      p2p/peer.go

@ -3,6 +3,7 @@ package p2p
import (
"bytes"
"encoding/binary"
"log"
"net"
"runtime"
"strings"
@ -104,7 +105,7 @@ func sendWithSocketClient(ip, port string, message []byte) (res string) {
conn, err := net.Dial("tcp", addr)
if err != nil {
log.Warn("Error dailing tcp", "address", addr, "error", err)
log.Printf("Dial(%s) failed: %v", addr, err)
return
}
defer conn.Close()

Loading…
Cancel
Save