{"action":"created","issue":{"url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/49","labels_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/49/comments","events_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/49/events","html_url":"https://github.com/OpenBazaar/OpenBazaar-Server/issues/49","id":112468918,"number":49,"title":"Bad handling of nodes with same ip","user":{"login":"cpacia","id":4504708,"avatar_url":"https://avatars.githubusercontent.com/u/4504708?v=3","gravatar_id":"","url":"https://api.github.com/users/cpacia","html_url":"https://github.com/cpacia","followers_url":"https://api.github.com/users/cpacia/followers","following_url":"https://api.github.com/users/cpacia/following{/other_user}","gists_url":"https://api.github.com/users/cpacia/gists{/gist_id}","starred_url":"https://api.github.com/users/cpacia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpacia/subscriptions","organizations_url":"https://api.github.com/users/cpacia/orgs","repos_url":"https://api.github.com/users/cpacia/repos","events_url":"https://api.github.com/users/cpacia/events{/privacy}","received_events_url":"https://api.github.com/users/cpacia/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-20T21:57:25Z","updated_at":"2015-10-21T01:27:13Z","closed_at":null,"body":"Currently, the code wont save a node in the routing table if it's guid already exists in the table, but it does save it has a different guid (but same IP). \r\n\r\nA bug has cropped up during testing where people delete their db to create a new guid and then reconnect to the network. We end up with multiple nodes from the same IP in the routing table. This sometimes causes nodes to send duplicate messages to that IP.\r\n\r\nFurthermore, it doesn't seem that the copies of the node are removed when `removeContact` is called.\r\n\r\nIf we prevent nodes with the same IP from being added to the routing table, then someone would be prevented from running two nodes on the same computer (maybe that's a good thing?). \r\n\r\nAlternatively we can improve the logic of `removeContact` so that nodes don't persist in the routing table after they've disconnected."},"comment":{"url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/comments/149752586","html_url":"https://github.com/OpenBazaar/OpenBazaar-Server/issues/49#issuecomment-149752586","issue_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/49","id":149752586,"user":{"login":"gubatron","id":163977,"avatar_url":"https://avatars.githubusercontent.com/u/163977?v=3","gravatar_id":"","url":"https://api.github.com/users/gubatron","html_url":"https://github.com/gubatron","followers_url":"https://api.github.com/users/gubatron/followers","following_url":"https://api.github.com/users/gubatron/following{/other_user}","gists_url":"https://api.github.com/users/gubatron/gists{/gist_id}","starred_url":"https://api.github.com/users/gubatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gubatron/subscriptions","organizations_url":"https://api.github.com/users/gubatron/orgs","repos_url":"https://api.github.com/users/gubatron/repos","events_url":"https://api.github.com/users/gubatron/events{/privacy}","received_events_url":"https://api.github.com/users/gubatron/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T01:27:13Z","updated_at":"2015-10-21T01:27:13Z","body":">Alternatively we can improve the logic of removeContact so that nodes don't persist in the routing table after they've disconnected.\r\n\r\nDo you have some sort of `BYE` message or some sort of Store shutdown procedure, so a node can tell everyone she's leaving?"}}