Fix accidentally removed line - sending nodes on getPeersRequest
This commit is contained in:
parent
42b1fb09c2
commit
558aa3f246
2 changed files with 6 additions and 5 deletions
|
|
@ -662,6 +662,7 @@ impl DhtState {
|
||||||
}
|
}
|
||||||
MessageKind::GetPeersRequest(req) => {
|
MessageKind::GetPeersRequest(req) => {
|
||||||
// TODO: respond with peer info, for now sending an empty response.
|
// 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);
|
self.routing_table.write().mark_last_query(&req.id);
|
||||||
let message = Message {
|
let message = Message {
|
||||||
transaction_id: msg.transaction_id,
|
transaction_id: msg.transaction_id,
|
||||||
|
|
@ -669,6 +670,7 @@ impl DhtState {
|
||||||
ip: None,
|
ip: None,
|
||||||
kind: MessageKind::Response(bprotocol::Response {
|
kind: MessageKind::Response(bprotocol::Response {
|
||||||
id: self.id,
|
id: self.id,
|
||||||
|
nodes: Some(compact_node_info),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -505,11 +505,10 @@ const FileSelectionModal = (props: {
|
||||||
|
|
||||||
const handleUpload = async () => {
|
const handleUpload = async () => {
|
||||||
setUploading(true);
|
setUploading(true);
|
||||||
API.uploadTorrent(data, { selectedFiles, unpopularTorrent }).then(
|
API.uploadTorrent(data, { selectedFiles, unpopularTorrent }).then(() => {
|
||||||
() => {
|
onHide();
|
||||||
onHide();
|
ctx.refreshTorrents();
|
||||||
ctx.refreshTorrents();
|
},
|
||||||
},
|
|
||||||
(e) => {
|
(e) => {
|
||||||
setUploadError({ text: 'Error starting torrent', details: e });
|
setUploadError({ text: 'Error starting torrent', details: e });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue