diff options
| author | Joseph Henry <joseph.henry@zerotier.com> | 2015-09-24 17:33:25 -0400 |
|---|---|---|
| committer | Joseph Henry <joseph.henry@zerotier.com> | 2015-09-24 17:33:25 -0400 |
| commit | 8a8264bc39b97bcce07933c0a5c3158208efcd6c (patch) | |
| tree | 1023884026caabe3cac822b96b77b90133af21d5 /netcon/NetconService.hpp | |
| parent | 1119f64a77a39619c8632ca1f6cbf3811edefa55 (diff) | |
| download | infinitytier-8a8264bc39b97bcce07933c0a5c3158208efcd6c.tar.gz infinitytier-8a8264bc39b97bcce07933c0a5c3158208efcd6c.zip | |
Fixed their_fd closure bug
Diffstat (limited to 'netcon/NetconService.hpp')
| -rw-r--r-- | netcon/NetconService.hpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/netcon/NetconService.hpp b/netcon/NetconService.hpp index 451d10cb..5ff575dc 100644 --- a/netcon/NetconService.hpp +++ b/netcon/NetconService.hpp @@ -66,6 +66,7 @@ namespace ZeroTier { class NetconConnection { public: + int perceived_fd; int their_fd; unsigned char buf[DEFAULT_READ_BUFFER_SIZE]; int idx; @@ -113,7 +114,7 @@ namespace ZeroTier { NetconConnection *getConnectionByTheirFD(int fd) { for(size_t i=0; i<connections.size(); i++) { - if(connections[i]->their_fd == fd) return connections[i]; + if(connections[i]->perceived_fd == fd) return connections[i]; } return NULL; } @@ -134,14 +135,6 @@ namespace ZeroTier { } return NULL; } - - void removeConnection(PhySocket *sock) - { - for(size_t i=0; i<connections.size(); i++) { - if(connections[i]->sock == sock) - connections.erase(connections.begin() + i); - } - } }; } // namespace ZeroTier |
