{"action":"created","issue":{"url":"https://api.github.com/repos/XSockets/XSockets.NET-4.0/issues/2","labels_url":"https://api.github.com/repos/XSockets/XSockets.NET-4.0/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/XSockets/XSockets.NET-4.0/issues/2/comments","events_url":"https://api.github.com/repos/XSockets/XSockets.NET-4.0/issues/2/events","html_url":"https://github.com/XSockets/XSockets.NET-4.0/issues/2","id":58269631,"number":2,"title":"XSockets 4.1: setting [ControllerEvent(name)] on a controller method causes it to be executed twice","user":{"login":"sunsided","id":495335,"avatar_url":"https://avatars.githubusercontent.com/u/495335?v=3","gravatar_id":"","url":"https://api.github.com/users/sunsided","html_url":"https://github.com/sunsided","followers_url":"https://api.github.com/users/sunsided/followers","following_url":"https://api.github.com/users/sunsided/following{/other_user}","gists_url":"https://api.github.com/users/sunsided/gists{/gist_id}","starred_url":"https://api.github.com/users/sunsided/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunsided/subscriptions","organizations_url":"https://api.github.com/users/sunsided/orgs","repos_url":"https://api.github.com/users/sunsided/repos","events_url":"https://api.github.com/users/sunsided/events{/privacy}","received_events_url":"https://api.github.com/users/sunsided/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-19T21:05:36Z","updated_at":"2015-03-11T08:26:24Z","closed_at":null,"body":"For XSockets 4.1, adding the attribute `[ControllerEvent(\"methodName\")]` to a controller method `MethodName(...)` causes it to be executed twice when invoked from a C# client (didn't test JavaScript).\r\n\r\n```csharp\r\nint count = 0;\r\n\r\n[ControllerEvent(\"fails\")]\r\npublic bool Fails(IMessage ignored)\r\n{\r\n    Interlocked.Increment(ref count);\r\n    return true;\r\n}\r\n```\r\n\r\nOn the other hand, setting the name to something else, with `[ControllerEvent(\"neverCalled\")]`,  causes the method to never be entered when invoking `neverCalled` from the client.\r\n\r\nExample code here: https://gist.github.com/sunsided/f4d8987ec70bf17c37fc\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/XSockets/XSockets.NET-4.0/issues/comments/78222194","html_url":"https://github.com/XSockets/XSockets.NET-4.0/issues/2#issuecomment-78222194","issue_url":"https://api.github.com/repos/XSockets/XSockets.NET-4.0/issues/2","id":78222194,"user":{"login":"codeplanner","id":844776,"avatar_url":"https://avatars.githubusercontent.com/u/844776?v=3","gravatar_id":"","url":"https://api.github.com/users/codeplanner","html_url":"https://github.com/codeplanner","followers_url":"https://api.github.com/users/codeplanner/followers","following_url":"https://api.github.com/users/codeplanner/following{/other_user}","gists_url":"https://api.github.com/users/codeplanner/gists{/gist_id}","starred_url":"https://api.github.com/users/codeplanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeplanner/subscriptions","organizations_url":"https://api.github.com/users/codeplanner/orgs","repos_url":"https://api.github.com/users/codeplanner/repos","events_url":"https://api.github.com/users/codeplanner/events{/privacy}","received_events_url":"https://api.github.com/users/codeplanner/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T08:26:24Z","updated_at":"2015-03-11T08:26:24Z","body":"Fixed in next release"}}