Also discovered this as a problem here , but hope someone saw it.
I have a very simple hub that implements IConnected / IDisconnect. In a stand-alone project, this hub went fine.
When I lowered it to my real project, where I already had other hubs, adding it, there were no available hubs (it was confirmed that there are no hubs in / signalr / hubs). Then I commented on IConnected / IDisconnect in this hub and recompiled it, and it appeared along with the others. Adding interfaces back broke everything.
Has anyone seen this before? Is there some kind of configuration missing or something else?
public class ChatHub : Hub, IConnected, IDisconnect
{
public void Test(string message)
{
}
public System.Threading.Tasks.Task Connect(IEnumerable<string> groups)
{
this.Clients.onNewUserOnline(Context.ConnectionId);
return new Task(() => { });
}
public Task Reconnect(IEnumerable<string> groups)
{
this.Clients.onNewUserOnline(Context.ConnectionId);
return new Task(() => { });
}
public Task Disconnect()
{
this.Clients.onUserOffline(Context.ConnectionId);
return new Task(() => { });
}
}
source
share