Explorar o código

Attempted fix for github issue #597, leaking sockets. Added call to closenatpmp() after failure to init

Joseph Henry %!s(int64=7) %!d(string=hai) anos
pai
achega
f18d5b2efe
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      osdep/PortMapper.cpp

+ 1 - 0
osdep/PortMapper.cpp

@@ -123,6 +123,7 @@ public:
 
 					if (initnatpmp(&natpmp,0,0) != 0) {
 						mode = 1;
+						closenatpmp(&natpmp);
 #ifdef ZT_PORTMAPPER_TRACE
                         PM_TRACE("PortMapper: NAT-PMP: init failed, switching to UPnP mode" ZT_EOL_S);
 #endif