{"action":"created","issue":{"url":"https://api.github.com/repos/jbenet/go-ipfs/issues/548","labels_url":"https://api.github.com/repos/jbenet/go-ipfs/issues/548/labels{/name}","comments_url":"https://api.github.com/repos/jbenet/go-ipfs/issues/548/comments","events_url":"https://api.github.com/repos/jbenet/go-ipfs/issues/548/events","html_url":"https://github.com/jbenet/go-ipfs/pull/548","id":54149419,"number":548,"title":"p2p/net/swarm: fix connect self problems","user":{"login":"jbenet","id":138401,"avatar_url":"https://avatars.githubusercontent.com/u/138401?v=3","gravatar_id":"","url":"https://api.github.com/users/jbenet","html_url":"https://github.com/jbenet","followers_url":"https://api.github.com/users/jbenet/followers","following_url":"https://api.github.com/users/jbenet/following{/other_user}","gists_url":"https://api.github.com/users/jbenet/gists{/gist_id}","starred_url":"https://api.github.com/users/jbenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbenet/subscriptions","organizations_url":"https://api.github.com/users/jbenet/orgs","repos_url":"https://api.github.com/users/jbenet/repos","events_url":"https://api.github.com/users/jbenet/events{/privacy}","received_events_url":"https://api.github.com/users/jbenet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jbenet/go-ipfs/labels/in+progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-13T04:22:30Z","updated_at":"2015-01-13T04:53:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jbenet/go-ipfs/pulls/548","html_url":"https://github.com/jbenet/go-ipfs/pull/548","diff_url":"https://github.com/jbenet/go-ipfs/pull/548.diff","patch_url":"https://github.com/jbenet/go-ipfs/pull/548.patch"},"body":"This adds two checks after a successful conn.Dial\n* if the remote peer is not who we wanted, close conn\n* if the remove peer is outselves, close conn\n\n(the second is redundant, but the codebase may evolve to end up disabling the\nfirst check, so keeping the second in place helps)\n\nnote: Loopback addresses are actually sent out (they _have to be_, in cases\nwhere there are >1 node in the same machine), so many times when trying\nconnections, nodes end up dialing themselves."},"comment":{"url":"https://api.github.com/repos/jbenet/go-ipfs/issues/comments/69695373","html_url":"https://github.com/jbenet/go-ipfs/pull/548#issuecomment-69695373","issue_url":"https://api.github.com/repos/jbenet/go-ipfs/issues/548","id":69695373,"user":{"login":"jbenet","id":138401,"avatar_url":"https://avatars.githubusercontent.com/u/138401?v=3","gravatar_id":"","url":"https://api.github.com/users/jbenet","html_url":"https://github.com/jbenet","followers_url":"https://api.github.com/users/jbenet/followers","following_url":"https://api.github.com/users/jbenet/following{/other_user}","gists_url":"https://api.github.com/users/jbenet/gists{/gist_id}","starred_url":"https://api.github.com/users/jbenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbenet/subscriptions","organizations_url":"https://api.github.com/users/jbenet/orgs","repos_url":"https://api.github.com/users/jbenet/repos","events_url":"https://api.github.com/users/jbenet/events{/privacy}","received_events_url":"https://api.github.com/users/jbenet/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T04:53:17Z","updated_at":"2015-01-13T04:53:17Z","body":"@whyrusleeping yeah makes sense. we want good heuristics to pick addrs"}}