77 Commits

Author SHA1 Message Date
Steven Allen
6eafd65baa thread context to prep (#286)
We usually _explicitly_ call connect before calling `prep` but we may disconnect
somewhere in-between. We _don't_ want to get stuck here dialing if the context
has been canceled.
2019-03-07 18:53:16 +11:00
Matt Joiner
4d5f60195f
Rework handleNewStream (#267) 2019-02-19 13:38:03 +11:00
Raúl Kripalani
120a585ebf Revert "Test go mod in travis and use major versioning in import paths (#236)"
This reverts commit 7e68ac3c60c15243c7d2e622b91aed92245a2677.
2019-02-12 14:12:53 +00:00
Adrian Lanzafame
7e68ac3c60 Test go mod in travis and use major versioning in import paths (#236) 2019-02-12 17:38:06 +11:00
Matt Joiner
8b37385468 Rename log to logger 2019-02-03 13:14:35 +11:00
Marten Seemann
da02d4a7d5 also use the buffered writer for handling new messages 2018-08-05 16:43:15 +07:00
Marten Seemann
6d6ed07850 buffer writes when sending protobufs
The protobuf writer performs multiple small writes when writing a
message. We need to buffer these, otherwise we'll send out a packet for
each Write call.
2018-08-05 13:03:29 +07:00
Steven Allen
63b47bb368
Merge pull request #166 from libp2p/fix/161
fix dht client bugs
2018-06-26 00:03:58 +00:00
Steven Allen
94fc630110 avoid adding dht *clients* to routing tables
fixes #162
2018-06-14 20:14:11 -07:00
Steven Allen
1d13eafc97 be more polite about closing streams
When a peer sends use a EOF after they're done sending us messages, we should be
polite and send one back.
2018-06-12 17:13:05 -07:00
Steven Allen
16de81932c fully close streams
That is, actually wait for the other end to send us an EOF.
2018-06-04 21:45:40 -07:00
Erin Swenson-Healey
d94deae41d make DHT protocols pluggable 2018-06-01 14:55:16 -07:00
Steven Allen
5b673372eb fix comment on invalidate. 2017-09-19 15:42:01 -07:00
Jeromy
4237ef0939 fix memory leak holding onto streams unnecessarily 2017-09-19 12:00:42 -07:00
Steven Allen
5bc13bf691 reset streams on error instead of closing. 2017-09-14 10:30:55 -07:00
Steven Allen
d3d572b74d Retry queries if a write to the stream fails.
Previously, we'd only retry when a write failed (in case the peer was using
single-use streams). However, in the new world of half-open streams, writes
still succeed on remote-closed streams so this isn't sufficient. Instead, we
need to retry on read failure as well.

Note: this was technically broken before because a peer could write on a stream
before receiving the close message causing the write to succeed but the
subsequent read to fail.
2017-09-14 10:30:52 -07:00
Steven Allen
286dd24fd2 update stream muxer 2017-09-14 09:41:26 -07:00
Jeromy
6894f33507 update dependencies after package extraction funtime 2016-10-05 12:34:28 -07:00
Jeromy
e00b3ca0a4 use stdlib context and clean up deps 2016-09-30 10:24:03 -07:00
Jeromy
d09b2e73d0 add back patch with protocol updates 2016-09-23 02:45:58 -07:00
George Antoniadis
9b3d1b5661 Bump deps, revert protobuf 2016-09-03 20:35:59 +01:00
George Antoniadis
30d43d22e0 Fix dependencies 2016-09-02 20:21:23 +01:00
George Antoniadis
5f3e63aa46 Undo gx rewrites and add gx package.json 2016-08-21 17:18:58 +01:00
Jeromy
95553964a2 update go-libp2p
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-04 12:27:26 -07:00
Jakub Sztandera
22af8d1151 Update go-log in whole dependency tree (#2898)
* Update golog in go-ipfs

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-secio for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-crypto for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-peer for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Import peersore, it wasn't imported

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update peerstore

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update peer

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update secio

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-24 09:38:07 -07:00
Jeromy
c29e3e29fd implement some simple dht request read timeouts
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-17 11:01:41 -07:00
Jeromy Johnson
3f05aa0579 Merge pull request #2853 from ipfs/feature/decapitalize-Debug
Decapitalized log.Debug messages
2016-06-17 10:26:20 -07:00
Jeromy
47d10d7be6 update go-libp2p to 3.3.4
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-15 13:04:49 -07:00
Jeromy Johnson
e7519fa51a Merge pull request #2856 from ipfs/fix/send-msg-race
pass reference to reader instead of using the one on the object
2016-06-15 12:47:01 -07:00
Jeromy
23050f9e30 pass reference to reader instead of using the one on the object
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-15 11:13:35 -07:00
Richard Littauer
2203d3b1fe Decapitalized log.Debug messages
According to golang standards, these should not be capitalized nor having a trailing period, AFAIK.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-06-15 08:56:34 +01:00
Jakub Sztandera
478d32510a Remove errors pointed out by govet
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-14 13:40:16 +02:00
Jeromy
63b6db0589 pull in libp2p updates with utp fixes
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-11 10:33:44 -07:00
Jeromy
cd34bf85e0 respect contexts while reading messages in dht
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-09 15:10:06 -07:00
Jeromy Johnson
9454558e9d Merge pull request #2817 from ipfs/feat/dht-reuse-stream
reuse streams for dht messaging
2016-06-08 10:08:25 -07:00
Jeromy
bd93c313c3 use constants for stream reuse heuristics
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-07 01:27:39 -07:00
Jeromy
71a8519372 update libp2p to version 3.2.2
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-07 00:20:06 -07:00
Jeromy
5d9a529d02 cleanup stream reuse
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-06 23:28:39 -07:00
Jeromy
031024b1c5 reuse streams in the dht networking code
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-06 17:35:56 -07:00
Jeromy
5f777f323b update libp2p to v3.3.1
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-01 16:45:46 -07:00
Jakub Sztandera
d189ae583f Move go-context to gx
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-05-31 22:40:35 +02:00
Jeromy
b0e5f253f9 update libp2p to v3.2.3
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-30 22:14:21 -07:00
Jeromy
26beb1f3d0 update go-libp2p 3.2.2, nil maddr fixes
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-17 10:23:10 -07:00
Jeromy
c81d962885 update libp2p to v3.2.1
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-16 11:22:36 -07:00
Jeromy
d6e7c3de0f update deps to introduce yamux hang fix
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-13 13:42:46 -07:00
Jeromy
b9f86c8c87 update libp2p with go-multiaddr and go-stream-muxer updates
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-10 16:06:28 -07:00
Jeromy
8cd54dd9d8 update libp2p with utp dep
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-04-27 14:10:54 -07:00
Lars Gierth
38ff911ada Use extracted go-libp2p-crypto, -secio, -peer packages
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-16 21:48:06 -07:00
Lars Gierth
aa46264d8a Update go-libp2p
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-16 21:23:47 -07:00
Jeromy
75844fe336 update libp2p dep to fix hanging listeners problem
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-11 12:52:54 -07:00