aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-08-03 08:45:33 +0800
committerFelix Lange <fjl@twurst.com>2015-08-04 09:10:27 +0800
commit5c949d3b3ba81ea0563575b19a7b148aeac4bf61 (patch)
tree05b9bbc8b837081cde166694d040ca1d9c972f45 /Godeps/_workspace/src/github.com/jackpal/go-nat-pmp
parentbf48ed32dd8be6bec2931c9f1eee4fd749affa21 (diff)
downloadgo-tangerine-5c949d3b3ba81ea0563575b19a7b148aeac4bf61.tar.gz
go-tangerine-5c949d3b3ba81ea0563575b19a7b148aeac4bf61.tar.zst
go-tangerine-5c949d3b3ba81ea0563575b19a7b148aeac4bf61.zip
fdtrack: temporary hack for tracking file descriptor usage
Package fdtrack logs statistics about open file descriptors. This should help identify the source of #1549.
Diffstat (limited to 'Godeps/_workspace/src/github.com/jackpal/go-nat-pmp')
-rw-r--r--Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go b/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go
index 8ce4e8342..b165c784e 100644
--- a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go
+++ b/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go
@@ -5,6 +5,8 @@ import (
"log"
"net"
"time"
+
+ "github.com/ethereum/go-ethereum/fdtrack"
)
// Implement the NAT-PMP protocol, typically supported by Apple routers and open source
@@ -102,6 +104,8 @@ func (n *Client) rpc(msg []byte, resultSize int) (result []byte, err error) {
if err != nil {
return
}
+ fdtrack.Open("natpmp")
+ defer fdtrack.Close("natpmp")
defer conn.Close()
result = make([]byte, resultSize)