Commit Graph

25 Commits

Author SHA1 Message Date
Juan Batiz-Benet
7c7ec14109 p2p/net/conn: log conn lifetime event 2015-02-01 22:08:48 -08:00
Juan Batiz-Benet
fc78f20093 p2p/conn: expose io.Closer interface 2015-02-01 06:35:48 -08:00
Juan Batiz-Benet
eb79770683 p2p/net: cleaned up dial events
+ fixed race
2015-01-28 02:15:32 -08:00
Juan Batiz-Benet
b4af146fc8 p2p/net: better dial log.Event 2015-01-28 00:13:42 -08:00
Juan Batiz-Benet
9dac5bb7d3 p2p/net: dial log -> events
This commit turns all dial logs into log.Events.

Everything's great except for one problem:
The LoggableMap I'm using does not print out things
correctly. I gave it peer.IDs, and Multiaddrs
and both got logged as nothing `{}` (didn't even call
their String() methods!) So, for now, this function
encodes it when called... This is wrong and should be
fixed before being merged in. Otherwise we  will be
constantly encoding peer.IDs and Multiaddrs without
needing to.

@briantigerchow how do you suggest doing this?
I don't know my way around your Loggable.
2015-01-27 01:35:37 -08:00
Juan Batiz-Benet
fda92754cc p2p/net/conn: reuse timeout is real error
should be returning false.
2015-01-26 14:00:00 -08:00
Juan Batiz-Benet
87458f6d6a p2p/net/dial: fixed data race 2015-01-24 10:22:56 -08:00
Juan Batiz-Benet
5c33b75b59 p2p/net/conn: timeouts are real failures. 2015-01-23 05:25:32 -08:00
Juan Batiz-Benet
1ec8874077 p2p/net/swarm + conn: logs + debugerr output 2015-01-23 01:52:42 -08:00
Juan Batiz-Benet
0821a5bd53 p2p/net/swarm: half the timeout of dial 2015-01-23 01:52:41 -08:00
Juan Batiz-Benet
223a97f3f8 p2p/net/conn: only reuseport if avail 2015-01-20 19:46:44 -08:00
Juan Batiz-Benet
6de542b1eb p2p/net/conn: cleaner reuse port setup
This commit cleans up the reuse port setup, and fixes a problem:
make sure to filter addrs out that we simply cannot dial with
(e.g. loopback -> non-loopback, or linklocal -> nonlinklocal)
2015-01-19 23:18:52 -08:00
Juan Batiz-Benet
60cecefc60 p2p/net/conn: log when reuse fails 2015-01-19 23:18:52 -08:00
Juan Batiz-Benet
334f9d2102 p2p/net/conn: use reuseport 2015-01-19 23:18:51 -08:00
Brian Tiger Chow
884143bf9c move generic packages to thirdparty (see thirdparty/README.md) 2015-01-18 14:04:45 -08:00
Juan Batiz-Benet
0311c0518d testing/ci: all env var checks now use new pkgs
Good thing, i checked one wrong, too!
2015-01-14 16:01:03 -08:00
Juan Batiz-Benet
7ec1a674e3 p2p/net/swarm: do not usre link local addrs 2015-01-12 19:15:02 -08:00
Juan Batiz-Benet
b7a4e92121 p2p/net/conn/Listener: ignore conns failed to secure
Instead of erroring out, which would break the listener,
we instead log a message and continue. This is not an error,
the internet is a place with lots of probing + connection
failures.
2015-01-11 12:55:33 -08:00
Juan Batiz-Benet
4525269cd8 p2p/net/conn/listener: ignore certain errors
This should handle early breakages, where a failing connection
would take out the listener entirely.

There are probably other errors we should be handling here,
like secure connection failures.
2015-01-11 12:55:33 -08:00
Juan Batiz-Benet
387c0508fe p2p/net/conn/dialer: added Dialer field 2015-01-11 12:55:33 -08:00
Juan Batiz-Benet
19a5f088d5 updated multiaddr 2015-01-09 06:13:24 -08:00
Juan Batiz-Benet
74a2f2b074 conn: close fixes 2015-01-07 19:01:10 -08:00
Juan Batiz-Benet
feb5e495f5 use ZeroLocalTCPAddress for network tests
This commit makes all network tests use ZeroLocalTCPAddress
as the initial peer address, and then relies on
net.ListenAddresses()

This should get rid of the tcp addr clash problems.
2015-01-02 08:46:46 -08:00
Juan Batiz-Benet
8fb5cf9578 swap net2 -> net 2015-01-02 08:46:46 -08:00
Juan Batiz-Benet
e2698a8733 net -> p2p/net
The net package is the next to move. It will be massaged
a bit still to fix the Network / "NetworkBackend" conflict.
2015-01-02 08:46:45 -08:00