{"action":"created","issue":{"url":"https://api.github.com/repos/NVentimiglia/WebSocket.Portable/issues/8","labels_url":"https://api.github.com/repos/NVentimiglia/WebSocket.Portable/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/NVentimiglia/WebSocket.Portable/issues/8/comments","events_url":"https://api.github.com/repos/NVentimiglia/WebSocket.Portable/issues/8/events","html_url":"https://github.com/NVentimiglia/WebSocket.Portable/issues/8","id":128443629,"number":8,"title":"ObjectDisposedException","user":{"login":"ZeAleks","id":4868394,"avatar_url":"https://avatars.githubusercontent.com/u/4868394?v=3","gravatar_id":"","url":"https://api.github.com/users/ZeAleks","html_url":"https://github.com/ZeAleks","followers_url":"https://api.github.com/users/ZeAleks/followers","following_url":"https://api.github.com/users/ZeAleks/following{/other_user}","gists_url":"https://api.github.com/users/ZeAleks/gists{/gist_id}","starred_url":"https://api.github.com/users/ZeAleks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZeAleks/subscriptions","organizations_url":"https://api.github.com/users/ZeAleks/orgs","repos_url":"https://api.github.com/users/ZeAleks/repos","events_url":"https://api.github.com/users/ZeAleks/events{/privacy}","received_events_url":"https://api.github.com/users/ZeAleks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-25T01:57:49Z","updated_at":"2016-01-31T00:12:46Z","closed_at":null,"body":"Hello,\r\n\r\nFirst of all, thank you for this project. It is really usefull.\r\n\r\nI'm UnitTesting (it is, in fact, an integrated test as it connect to the server) a PCL project. WebSocket.Portable.Core is version 1.2.6\r\nrda.SocketsForPCL is version 1.2.2\r\nI'm trying to send a simple message to my websocket server but I get an ObjectDisposedException.\r\nThe code is straightforward :\r\n\r\nwsClient = new WebSocketClient();\r\nwsClient.MessageReceived += WsClient_MessageReceived;\r\nwsClient.Closed += WsClient_Closed;\r\nwsClient.Opened += WsClient_Opened;\r\nwsClient.Error += WsClient_Error;\r\nawait wsClient.OpenAsync(\"ws://myserver\", 8000, false);\r\n\r\nawait wsClient.SendAsync(\"ping\");\r\n\r\nEverything is OK until the last line where I get the exception :\r\n\r\n   à System.Net.Sockets.NetworkStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)\r\n   à System.IO.Stream.<>c.<BeginEndWriteAsync>b__53_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, Object state)\r\n   à System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func`5 beginMethod, Func`3 endMethod)\r\n   à System.IO.Stream.BeginEndWriteAsync(Byte[] buffer, Int32 offset, Int32 count)\r\n   à System.IO.Stream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)\r\n   à WebSocket.Portable.TcpConnection.WriteAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken)\r\n   à WebSocket.Portable.WebSocketFrame.<WriteToAsync>d__48.MoveNext()\r\n--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---\r\n   à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   à System.Runtime.CompilerServices.TaskAwaiter.GetResult()\r\n   à ShareMyPos.Client.Common.Server.ServerOpenshift.<InitializeAndStart>d__3.MoveNext() dans C:\\Users\\Aleksandar\\Source\\Repos\\ShareMyPos\\ShareMyPos.Client.Common\\Server\\ServerOpenshift.cs:ligne 31\r\n--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---\r\n   à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   à System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   à ShareMyPos.IntegratedTests.BasicIntegratedTest.OneConnection_ShouldNotGetErrors() dans C:\\Users\\Aleksandar\\Source\\Repos\\ShareMyPos\\Tests\\ShareMyPos.IntegratedTests\\BasicIntegratedTest.cs:ligne 24\r\n\r\n@NVentimiglia, I  saw your messages here : https://github.com/rdavisau/sockets-for-pcl/issues/34\r\nYou certainly found a workarround and I must be missing something ...\r\n\r\nCan you help me please ?\r\n\r\nThank you.\r\nAlek"},"comment":{"url":"https://api.github.com/repos/NVentimiglia/WebSocket.Portable/issues/comments/177342606","html_url":"https://github.com/NVentimiglia/WebSocket.Portable/issues/8#issuecomment-177342606","issue_url":"https://api.github.com/repos/NVentimiglia/WebSocket.Portable/issues/8","id":177342606,"user":{"login":"NVentimiglia","id":125889,"avatar_url":"https://avatars.githubusercontent.com/u/125889?v=3","gravatar_id":"","url":"https://api.github.com/users/NVentimiglia","html_url":"https://github.com/NVentimiglia","followers_url":"https://api.github.com/users/NVentimiglia/followers","following_url":"https://api.github.com/users/NVentimiglia/following{/other_user}","gists_url":"https://api.github.com/users/NVentimiglia/gists{/gist_id}","starred_url":"https://api.github.com/users/NVentimiglia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NVentimiglia/subscriptions","organizations_url":"https://api.github.com/users/NVentimiglia/orgs","repos_url":"https://api.github.com/users/NVentimiglia/repos","events_url":"https://api.github.com/users/NVentimiglia/events{/privacy}","received_events_url":"https://api.github.com/users/NVentimiglia/received_events","type":"User","site_admin":false},"created_at":"2016-01-31T00:12:46Z","updated_at":"2016-01-31T00:12:46Z","body":"https://github.com/NVentimiglia/Websockets.Pcl\r\n\r\nPlease try this out. It has limited testing, but it is a radically simpler plugin."}}