Skip to content

Commit b4523f3

Browse files
committed
Remove the redundant config.EnableAllPeerToPeer(); call
1 parent 1aa7167 commit b4523f3

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

dotnet-maui/DittoMauiTasksApp/MauiProgram.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ private static Ditto SetupDitto()
5353

5454
ditto.UpdateTransportConfig(config =>
5555
{
56-
config.Connect.WebsocketUrls.Add(websocketUrl);
57-
// Optionally enable all P2P transports if using P2P Sync
58-
// Do not call this if only using Ditto Cloud Sync
56+
// Add the websocket URL to the transport configuration.
5957
config.Connect.WebsocketUrls.Add(websocketUrl);
6058
});
6159

dotnet-tui/DittoDotNetTasksConsole/TasksPeer.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,8 @@ public TasksPeer(string appId, string playgroundToken, string authUrl, string we
7474

7575
ditto = new Ditto(identity, tempDir);
7676

77-
ditto.UpdateTransportConfig(config => {
78-
// Optionally enable all P2P transports if using P2P Sync
79-
// Do not call this if only using Ditto Cloud Sync
80-
config.EnableAllPeerToPeer();
81-
77+
ditto.UpdateTransportConfig(config =>
78+
{
8279
// Add the websocket URL to the transport configuration.
8380
config.Connect.WebsocketUrls.Add(websocketUrl);
8481
});

dotnet-winforms/TasksApp/TasksPeer.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,8 @@ public TasksPeer(string appId, string playgroundToken, string authUrl, string we
7171

7272
ditto = new Ditto(identity, dir);
7373

74-
ditto.UpdateTransportConfig(config => {
75-
// Optionally enable all P2P transports if using P2P Sync
76-
// Do not call this if only using Ditto Cloud Sync
77-
ditto.TransportConfig.EnableAllPeerToPeer();
78-
74+
ditto.UpdateTransportConfig(config =>
75+
{
7976
// Add the websocket URL to the transport configuration.
8077
ditto.TransportConfig.Connect.WebsocketUrls.Add(websocketUrl);
8178
});

0 commit comments

Comments
 (0)