Sioro-Neoku / go-peerflix

Go Peerflix
MIT License
470 stars 119 forks source link

Can't build client.go #21

Closed photoessays closed 8 years ago

photoessays commented 8 years ago

If I try to build or run the program it fails:

go build *.go

./client.go:200: cannot call non-function t.torrent.Peers (type map[torrent.peersKey]torrent.Peer)

I've fixed it just changing from client.go, line 200. Original code:

fmt.Printf("Connections: \t%d\n", len(t.Peers()))

Fixed code:

fmt.Printf("Connections: \t%d\n", len(t.Conns))

But I don't know if this is the best way to do it.

Sioro-Neoku commented 8 years ago

Should be fixed in master.

rubenk commented 8 years ago

I just bumped into the same thing, it isn't fixed on master yet.

Sioro-Neoku commented 8 years ago

Seems like for now we can't count the number of connections. I'll work with upstream to get it back, there is already an issue about exposing more network information at https://github.com/anacrolix/torrent/issues/51.

Should be fixed in: https://github.com/Sioro-Neoku/go-peerflix/commit/1d886ed981c0175ad93f1ba3850b87ebdf6d5034