mirror of
https://github.com/boldsuck/haveno.git
synced 2025-01-03 14:49:25 +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() {
|
||||
if (connectionService.isShutDownStarted()) return; // ignore if shutting down
|
||||
p2pPeersTableView.getItems().forEach(P2pNetworkListItem::cleanup);
|
||||
p2pNetworkListItems.clear();
|
||||
p2pNetworkListItems.setAll(p2PService.getNetworkNode().getAllConnections().stream()
|
||||
.map(connection -> new P2pNetworkListItem(connection, clockWatcher))
|
||||
.collect(Collectors.toList()));
|
||||
UserThread.execute(() -> {
|
||||
if (connectionService.isShutDownStarted()) return; // ignore if shutting down
|
||||
p2pPeersTableView.getItems().forEach(P2pNetworkListItem::cleanup);
|
||||
p2pNetworkListItems.clear();
|
||||
p2pNetworkListItems.setAll(p2PService.getNetworkNode().getAllConnections().stream()
|
||||
.map(connection -> new P2pNetworkListItem(connection, clockWatcher))
|
||||
.collect(Collectors.toList()));
|
||||
});
|
||||
}
|
||||
|
||||
private void updateMoneroConnectionsTable() {
|
||||
|
|
Loading…
Reference in a new issue