From e03bb0606a10f29c8b94909a713a5bb5c69e88b7 Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Thu, 21 Jun 2007 22:40:22 +0000 Subject: merge -r62831:64079 branches/maintenance to release --- indra/llmessage/net.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/llmessage/net.cpp') 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) -- cgit v1.2.3