Skip to content

Commit

Permalink
Merge pull request #518 from jbenet/gc-conns
Browse files Browse the repository at this point in the history
gc closed conns
  • Loading branch information
jbenet committed Jan 8, 2015
2 parents 04b938b + 84a2a59 commit b427df3
Show file tree
Hide file tree
Showing 9 changed files with 332 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions Godeps/_workspace/src/github.com/jbenet/go-peerstream/conn.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 66 additions & 3 deletions Godeps/_workspace/src/github.com/jbenet/go-peerstream/swarm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions p2p/net/conn/secure_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ func newSecureConn(ctx context.Context, sk ic.PrivKey, insecure Conn) (Conn, err
}

func (c *secureConn) Close() error {
if err := c.secure.Close(); err != nil {
c.insecure.Close()
return err
}
return c.insecure.Close()
return c.secure.Close()
}

// ID is an identifier unique to this connection.
Expand Down
2 changes: 2 additions & 0 deletions p2p/test/reconnects/reconnect.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package reconnect tests connect -> disconnect -> reconnect works
package reconnect
Loading

0 comments on commit b427df3

Please sign in to comment.