mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-01-08 03:49:38 +00:00
update p2p table on user thread to fix null scene
This commit is contained in:
parent
89007c496e
commit
c1b17cf612
1 changed files with 8 additions and 6 deletions
|
@ -508,12 +508,14 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateP2PTable() {
|
private void updateP2PTable() {
|
||||||
if (connectionService.isShutDownStarted()) return; // ignore if shutting down
|
UserThread.execute(() -> {
|
||||||
p2pPeersTableView.getItems().forEach(P2pNetworkListItem::cleanup);
|
if (connectionService.isShutDownStarted()) return; // ignore if shutting down
|
||||||
p2pNetworkListItems.clear();
|
p2pPeersTableView.getItems().forEach(P2pNetworkListItem::cleanup);
|
||||||
p2pNetworkListItems.setAll(p2PService.getNetworkNode().getAllConnections().stream()
|
p2pNetworkListItems.clear();
|
||||||
.map(connection -> new P2pNetworkListItem(connection, clockWatcher))
|
p2pNetworkListItems.setAll(p2PService.getNetworkNode().getAllConnections().stream()
|
||||||
.collect(Collectors.toList()));
|
.map(connection -> new P2pNetworkListItem(connection, clockWatcher))
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMoneroConnectionsTable() {
|
private void updateMoneroConnectionsTable() {
|
||||||
|
|
Loading…
Reference in a new issue