pusher / pusher-websocket-dotnet

Pusher Channels Client Library for .NET
MIT License
112 stars 113 forks source link

Bugfix/connection memory leak #30

Closed WillSewell closed 7 years ago

WillSewell commented 7 years ago

Rebased: https://github.com/pusher-community/pusher-websocket-dotnet/pull/27

I no longer think it's necessary to call _connection.Disconnect(); because _connection will never be not null, and the only way it can be null is if Disconnect() has been explicitly called.

Also no longer call UnregisterEventsOnConnection(); in Connect(), again because in order to make it that far into the function, Disconnect() must have already been called (which already calls this).