summaryrefslogtreecommitdiff
path: root/indra/llmessage/net.cpp
diff options
context:
space:
mode:
authorKelly Washington <kelly@lindenlab.com>2007-06-21 22:40:22 +0000
committerKelly Washington <kelly@lindenlab.com>2007-06-21 22:40:22 +0000
commite03bb0606a10f29c8b94909a713a5bb5c69e88b7 (patch)
tree6d8d07894579438c8cc70e08f5730c3c95dfe768 /indra/llmessage/net.cpp
parent2638f12f95eea692502836cf6548b4a0b234d009 (diff)
merge -r62831:64079 branches/maintenance to release
Diffstat (limited to 'indra/llmessage/net.cpp')
-rw-r--r--indra/llmessage/net.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp
index 9e83ce1434..8cd7180f9a 100644
--- a/indra/llmessage/net.cpp
+++ b/indra/llmessage/net.cpp
@@ -269,8 +269,12 @@ S32 start_net(S32& socket_out, int& nPort)
return 0;
}
-void end_net()
+void end_net(S32& socket_out)
{
+ if (socket_out < 0)
+ {
+ closesocket(socket_out);
+ }
WSACleanup();
}
@@ -437,8 +441,12 @@ S32 start_net(S32& socket_out, int& nPort)
return 0;
}
-void end_net()
+void end_net(S32& socket_out)
{
+ if (socket_out < 0)
+ {
+ close(socket_out);
+ }
}
int receive_packet(int hSocket, char * receiveBuffer)