{"action":"created","issue":{"url":"https://api.github.com/repos/SignalR/SignalR/issues/1170","labels_url":"https://api.github.com/repos/SignalR/SignalR/issues/1170/labels{/name}","comments_url":"https://api.github.com/repos/SignalR/SignalR/issues/1170/comments","events_url":"https://api.github.com/repos/SignalR/SignalR/issues/1170/events","html_url":"https://github.com/SignalR/SignalR/issues/1170","id":9408489,"number":1170,"title":"Can't get OnConnected() and OnDisconnected() to fire","user":{"login":"smithkl42","id":2381026,"avatar_url":"https://avatars.githubusercontent.com/u/2381026?v=3","gravatar_id":"","url":"https://api.github.com/users/smithkl42","html_url":"https://github.com/smithkl42","followers_url":"https://api.github.com/users/smithkl42/followers","following_url":"https://api.github.com/users/smithkl42/following{/other_user}","gists_url":"https://api.github.com/users/smithkl42/gists{/gist_id}","starred_url":"https://api.github.com/users/smithkl42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smithkl42/subscriptions","organizations_url":"https://api.github.com/users/smithkl42/orgs","repos_url":"https://api.github.com/users/smithkl42/repos","events_url":"https://api.github.com/users/smithkl42/events{/privacy}","received_events_url":"https://api.github.com/users/smithkl42/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SignalR/SignalR/labels/question","name":"question","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2012-12-19T17:40:44Z","updated_at":"2015-04-13T11:26:51Z","closed_at":"2012-12-19T18:04:33Z","body":"I've got a pretty simple demo app using RC1 in which I can't get the `Hub.OnConnected()` and `Hub.OnDisconnected()` overrides to fire. \r\n\r\nThe full app is up on BitBucket:\r\n\r\nhttps://bitbucket.org/smithkl42/signalr.webrtc\r\n\r\nThe specific Hub I'm having difficulty with is here:\r\n\r\nhttps://bitbucket.org/smithkl42/signalr.webrtc/src/bc56ba42990cda3025155990b096d6ec8a3fbd53/SignalR.WebRTC/Hubs/RoomHub.cs?at=default\r\n\r\n```\r\npublic override Task OnConnected()\r\n{\r\n\tDebug.WriteLine(\"Connecting: \" + Context.ConnectionId);\r\n\treturn base.OnConnected();\r\n}\r\n\r\npublic override Task OnDisconnected()\r\n{\r\n\ttry\r\n\t{\r\n\t\tGuid sessionId;\r\n\t\tif (connectionToSession.TryGetValue(Context.ConnectionId, out sessionId))\r\n\t\t{\r\n\t\t\tLeaveRoom(sessionId);\r\n\t\t}\r\n\t}\r\n\tcatch (Exception ex)\r\n\t{\r\n\t\tDebug.WriteLine(\"Error processing OnDisconnected() event: \" + ex);\r\n\t}\r\n\treturn base.OnDisconnected();\r\n}\r\n```\r\n\r\nThe hub methods get called correctly, but neither the `OnConnected()` nor `OnDisconnected()` overrides fire.\r\n\r\nIs there something obvious that I'm doing wrong? Or is this a SignalR bug?"},"comment":{"url":"https://api.github.com/repos/SignalR/SignalR/issues/comments/92319530","html_url":"https://github.com/SignalR/SignalR/issues/1170#issuecomment-92319530","issue_url":"https://api.github.com/repos/SignalR/SignalR/issues/1170","id":92319530,"user":{"login":"shwetayadkikar","id":8253978,"avatar_url":"https://avatars.githubusercontent.com/u/8253978?v=3","gravatar_id":"","url":"https://api.github.com/users/shwetayadkikar","html_url":"https://github.com/shwetayadkikar","followers_url":"https://api.github.com/users/shwetayadkikar/followers","following_url":"https://api.github.com/users/shwetayadkikar/following{/other_user}","gists_url":"https://api.github.com/users/shwetayadkikar/gists{/gist_id}","starred_url":"https://api.github.com/users/shwetayadkikar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shwetayadkikar/subscriptions","organizations_url":"https://api.github.com/users/shwetayadkikar/orgs","repos_url":"https://api.github.com/users/shwetayadkikar/repos","events_url":"https://api.github.com/users/shwetayadkikar/events{/privacy}","received_events_url":"https://api.github.com/users/shwetayadkikar/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T11:26:51Z","updated_at":"2015-04-13T11:26:51Z","body":"I am using SignalR 2.2.0 and have same issue as @vkelman "}}