Skip to content

Commit 140236b

Browse files
authored
Merge pull request #121 from aspnet/chenyl/fixadvanced
Fix advaced chatroom
2 parents b31108e + 6b286cf commit 140236b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

samples/AdvancedChatRoom/Hub/ChatBase.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System.Collections.Generic;
5+
using System.Threading.Tasks;
56
using Microsoft.AspNetCore.SignalR;
67

78
namespace Microsoft.Azure.SignalR.Samples.AdvancedChatRoom
@@ -18,13 +19,13 @@ public void Echo(string name, string message)
1819
Clients.Client(Context.ConnectionId).SendAsync("echo", name, message + " (echo from server)");
1920
}
2021

21-
public async void JoinGroup(string name, string groupName)
22+
public async Task JoinGroup(string name, string groupName)
2223
{
2324
await Groups.AddToGroupAsync(Context.ConnectionId, groupName);
2425
await Clients.Group(groupName).SendAsync("echo", "_SYSTEM_", $"{name} joined {groupName} with connectionId {Context.ConnectionId}");
2526
}
2627

27-
public async void LeaveGroup(string name, string groupName)
28+
public async Task LeaveGroup(string name, string groupName)
2829
{
2930
await Groups.RemoveFromGroupAsync(Context.ConnectionId, groupName);
3031
await Clients.Client(Context.ConnectionId).SendAsync("echo", "_SYSTEM_", $"{name} leaved {groupName}");

0 commit comments

Comments
 (0)