statianzo/Fleck — Issue #36: Exception on WebSocketServer Dispose()
Author: statianzo
Created: 2012-01-24 22:09:59+00:00
State: open
Labels: bug-p1

As seen here:
https://gist.github.com/1672857

```
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.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.b__c(IAsyncResult r)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar,
Func`2 endFunction, Action`1 endAction, Task`1 promise)<---
```