{"action":"created","issue":{"url":"https://api.github.com/repos/arvidn/libtorrent/issues/178","labels_url":"https://api.github.com/repos/arvidn/libtorrent/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/arvidn/libtorrent/issues/178/comments","events_url":"https://api.github.com/repos/arvidn/libtorrent/issues/178/events","html_url":"https://github.com/arvidn/libtorrent/pull/178","id":107775008,"number":178,"title":"Make dht_put_alert more accurate.","user":{"login":"thomas-yuan","id":13663657,"avatar_url":"https://avatars.githubusercontent.com/u/13663657?v=3","gravatar_id":"","url":"https://api.github.com/users/thomas-yuan","html_url":"https://github.com/thomas-yuan","followers_url":"https://api.github.com/users/thomas-yuan/followers","following_url":"https://api.github.com/users/thomas-yuan/following{/other_user}","gists_url":"https://api.github.com/users/thomas-yuan/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-yuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-yuan/subscriptions","organizations_url":"https://api.github.com/users/thomas-yuan/orgs","repos_url":"https://api.github.com/users/thomas-yuan/repos","events_url":"https://api.github.com/users/thomas-yuan/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-yuan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2015-09-22T18:39:04Z","updated_at":"2015-10-24T01:35:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/arvidn/libtorrent/pulls/178","html_url":"https://github.com/arvidn/libtorrent/pull/178","diff_url":"https://github.com/arvidn/libtorrent/pull/178.diff","patch_url":"https://github.com/arvidn/libtorrent/pull/178.patch"},"body":"When I start using libtorrent DHT at beginning,  I didn't know there is a dht_put.cpp in tools. My colleague found a similar code and we using it as our test app. But seems like 'mput' doesn't work properly. After investigating for a while, I found the reason: the sign_mutable_item used a incorrect private key to sign the data, so actually DHT always get \"invalid signature\" error, but since the dht_put_alert was sent before 'put' and there is no indicator to say the 'put' is success or failed, so as a user, I wouldn't know the put actually was failed. instead, I always get dht_put_alert which seems like the 'put' is done successfully. \r\n\r\nThat's why I created this PR.\r\nTested with dht_put.cpp, and seems work fine for me.\r\n"},"comment":{"url":"https://api.github.com/repos/arvidn/libtorrent/issues/comments/150733642","html_url":"https://github.com/arvidn/libtorrent/pull/178#issuecomment-150733642","issue_url":"https://api.github.com/repos/arvidn/libtorrent/issues/178","id":150733642,"user":{"login":"ssiloti","id":155790,"avatar_url":"https://avatars.githubusercontent.com/u/155790?v=3","gravatar_id":"","url":"https://api.github.com/users/ssiloti","html_url":"https://github.com/ssiloti","followers_url":"https://api.github.com/users/ssiloti/followers","following_url":"https://api.github.com/users/ssiloti/following{/other_user}","gists_url":"https://api.github.com/users/ssiloti/gists{/gist_id}","starred_url":"https://api.github.com/users/ssiloti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssiloti/subscriptions","organizations_url":"https://api.github.com/users/ssiloti/orgs","repos_url":"https://api.github.com/users/ssiloti/repos","events_url":"https://api.github.com/users/ssiloti/events{/privacy}","received_events_url":"https://api.github.com/users/ssiloti/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T01:35:19Z","updated_at":"2015-10-24T01:35:19Z","body":"@thomas-yuan you're right, I missed the bit of code in rpc_manager::incoming() which calls timeout() on any error response. This is going to need refactoring to be able to handle cas errors correctly."}}