Fix accidentally removed line - sending nodes on getPeersRequest

This commit is contained in:
Igor Katson 2023-11-30 16:52:03 +00:00
parent 42b1fb09c2
commit 558aa3f246
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
2 changed files with 6 additions and 5 deletions

View file

@ -662,6 +662,7 @@ impl DhtState {
}
MessageKind::GetPeersRequest(req) => {
// TODO: respond with peer info, for now sending an empty response.
let compact_node_info = generate_compact_nodes(req.info_hash);
self.routing_table.write().mark_last_query(&req.id);
let message = Message {
transaction_id: msg.transaction_id,
@ -669,6 +670,7 @@ impl DhtState {
ip: None,
kind: MessageKind::Response(bprotocol::Response {
id: self.id,
nodes: Some(compact_node_info),
..Default::default()
}),
};

View file

@ -505,11 +505,10 @@ const FileSelectionModal = (props: {
const handleUpload = async () => {
setUploading(true);
API.uploadTorrent(data, { selectedFiles, unpopularTorrent }).then(
() => {
onHide();
ctx.refreshTorrents();
},
API.uploadTorrent(data, { selectedFiles, unpopularTorrent }).then(() => {
onHide();
ctx.refreshTorrents();
},
(e) => {
setUploadError({ text: 'Error starting torrent', details: e });
}