Skip to content

Instantly share code, notes, and snippets.

@damianh
Created January 24, 2012 21:35
Show Gist options
  • Save damianh/1672857 to your computer and use it in GitHub Desktop.
Save damianh/1672857 to your computer and use it in GitHub Desktop.
Fleck exception on server dispose
using (var server = new WebSocketServer("ws://localhost:8181"))
{
server.Start(connection => { });
}
24/01/2012 21:29:32 [Info] Server started at ws://localhost:8181
24/01/2012 21:29:32 [Error] Listener socket is closed System.AggregateException:
One or more errors occurred. ---> System.ObjectDisposedException: Cannot access
a disposed object.
Object name: 'System.Net.Sockets.Socket'.
at System.Net.Sockets.Socket.EndAccept(IAsyncResult asyncResult)
at Fleck.SocketWrapper.<Accept>b__c(IAsyncResult r)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar,
Func`2 endFunction, Action`1 endAction, Task`1 promise)
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.ObjectDisposedException: Cannot access a dispos
ed object.
Object name: 'System.Net.Sockets.Socket'.
at System.Net.Sockets.Socket.EndAccept(IAsyncResult asyncResult)
at Fleck.SocketWrapper.<Accept>b__c(IAsyncResult r)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar,
Func`2 endFunction, Action`1 endAction, Task`1 promise)<---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment