Skip to content

Commit cf03759

Browse files
committed
Fix
1 parent 978013b commit cf03759

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

samples/Management/MessagePublisher/Program.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,17 @@ private static async Task StartAsync(MessagePublisher publisher)
101101
else if (args.Length == 3 && args[0] == "close")
102102
{
103103
await publisher.CloseConnection(args[1], args[2]);
104-
Console.WriteLine($"Close connection '{args[1]}' because '{args[2]}'");
104+
Console.WriteLine($"closed connection '{args[1]}' because '{args[2]}'");
105105
}
106106
else if (args.Length == 3 && args[0] == "checkexist")
107107
{
108108
var exist = await publisher.CheckExist(args[1].ToLowerInvariant(), args[2]);
109-
Console.WriteLine(exist ? $"{args[1]} '{args[2]}' exists." : $"{args[1]} '{args[2]}' does not exist.");
109+
Console.WriteLine(exist ? "exists" : "not exist");
110110
}
111111
else if (args.Length == 2 && args[0] == "close")
112112
{
113113
await publisher.CloseConnection(args[1], null);
114-
Console.WriteLine($"Close connection '{args[1]}'.");
114+
Console.WriteLine("closed");
115115
}
116116
else
117117
{
@@ -131,10 +131,10 @@ private static void ShowHelp()
131131
Console.Write(
132132
@"*********Usage*********
133133
send user <UserId> <Message>
134-
send users <User1,User2,...> <Message>
134+
send users <User1>,<User2>,... <Message>
135135
send group <GroupName> <Message>
136-
send groups <Group1,Group2,...> <Message>
137-
usergroup add <User1,User2,...> <GroupName>
136+
send groups <Group1>,<Group2>,... <Message>
137+
usergroup add <User1>,<User2>,... <GroupName>
138138
usergroup remove <UserId> <GroupName>
139139
broadcast <Message>
140140
close <ConnectionID> <Reason>?

samples/Management/NegotiationServer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ var negotiateResponse = await serviceHubContext.NegotiateAsync(new()
9191
EnableDetailedErrors = true
9292
});
9393
```
94-
`EnableDetailedErrors` defaults to false because these exception messages can contain sensitive information.
94+
> `EnableDetailedErrors` defaults to false because these exception messages can contain sensitive information.
9595
## Full Sample
9696

9797
The full negotiation server sample can be found [here](.). The usage of this sample can be found [here](<https://github.com/aspnet/AzureSignalR-samples/tree/master/samples/Management#start-the-negotiation-server>).

samples/Management/SignalRClient/Program.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,13 @@ static HubConnection CreateHubConnection(string hubEndpoint, string userId)
6161

6262
connection.Closed += ex =>
6363
{
64-
Console.WriteLine($"The connection of '{userId}' is closed. Exception: {ex}");
65-
if (ex == null)
64+
Console.Write($"The connection of '{userId}' is closed.");
65+
//If you expect non-null exception, you need to turn on 'EnableDetailedErrors' option during client negotiation.
66+
if (ex != null)
6667
{
67-
Console.WriteLine("If you expect non-null exception, you need to turn on 'EnableDetailedErrors' option during client negotiation.");
68+
Console.Write($" Exception: {ex}");
6869
}
69-
70+
Console.WriteLine();
7071
return Task.CompletedTask;
7172
};
7273

0 commit comments

Comments
 (0)