Permalink
Browse files

Merge pull request #7 from aW4KeNiNG/closeFix

Fix: Error when the close method was called.
  • Loading branch information...
MattTuttle committed Jan 26, 2016
2 parents 9e10484 + 97454c6 commit 0f7f78d5e1af0cd762605399ac131f62076a6273
Showing with 2 additions and 2 deletions.
  1. +2 −2 hxnet/tcp/Client.hx
View
@@ -116,9 +116,9 @@ class Client implements hxnet.interfaces.Client
public function close()
{
client.close();
client = null;
protocol.loseConnection();
protocol = null;
client = null;
}
private inline function get_connected():Bool
@@ -137,7 +137,7 @@ class Client implements hxnet.interfaces.Client
private function set_protocol(value:Protocol):Protocol
{
if (client != null)
if (client != null && value != null)
{
value.onConnect(new Connection(client));
}

0 comments on commit 0f7f78d

Please sign in to comment.