summaryrefslogtreecommitdiff
path: root/node/SocketManager.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-03-26 17:59:45 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-03-26 17:59:45 -0700
commit2ac56fd120c3c9dd924fccc169beed2d51658ba9 (patch)
treebb17861516a42791f2f3545abc3871d59e53d3da /node/SocketManager.cpp
parente6b23059aca4947c8c4638c5d5e0abdba3b2b7b7 (diff)
downloadinfinitytier-2ac56fd120c3c9dd924fccc169beed2d51658ba9.tar.gz
infinitytier-2ac56fd120c3c9dd924fccc169beed2d51658ba9.zip
Fix TCP connection accumulation problem, still having issues with TCP tunneling.
Diffstat (limited to 'node/SocketManager.cpp')
-rw-r--r--node/SocketManager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/node/SocketManager.cpp b/node/SocketManager.cpp
index 2f6eb4fb..893e17d1 100644
--- a/node/SocketManager.cpp
+++ b/node/SocketManager.cpp
@@ -395,17 +395,17 @@ bool SocketManager::send(const InetAddress &to,bool tcp,const void *msg,unsigned
if (!ts->send(to,msg,msglen))
return false;
+ {
+ Mutex::Lock _l(_tcpSockets_m);
+ _tcpSockets[to] = ts;
+ }
+
_fdSetLock.lock();
FD_SET(s,&_readfds);
if (connecting)
FD_SET(s,&_writefds);
_fdSetLock.unlock();
- {
- Mutex::Lock _l(_tcpSockets_m);
- _tcpSockets[to] = ts;
- }
-
return true;
} else if (to.isV4()) {
if (_udpV4Socket)