diff --git a/README.md b/README.md index b60582f..382e17b 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ Internet-detector is an application for checking the availability of the Interne **OpenWrt >= 21.02:** opkg update - wget --no-check-certificate -O /tmp/internet-detector_1.0-2_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.0-2_all.ipk - opkg install /tmp/internet-detector_1.0-2_all.ipk - rm /tmp/internet-detector_1.0-2_all.ipk + wget --no-check-certificate -O /tmp/internet-detector_1.0-3_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.0-3_all.ipk + opkg install /tmp/internet-detector_1.0-3_all.ipk + rm /tmp/internet-detector_1.0-3_all.ipk /etc/init.d/internet-detector start /etc/init.d/internet-detector enable diff --git a/internet-detector/Makefile b/internet-detector/Makefile index f810124..89ab147 100644 --- a/internet-detector/Makefile +++ b/internet-detector/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=internet-detector PKG_VERSION:=1.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=gSpot include $(INCLUDE_DIR)/package.mk diff --git a/internet-detector/files/usr/bin/internet-detector b/internet-detector/files/usr/bin/internet-detector index b0049e5..aefd6bf 100755 --- a/internet-detector/files/usr/bin/internet-detector +++ b/internet-detector/files/usr/bin/internet-detector @@ -260,6 +260,7 @@ function InternetDetector:TCPConnectionToHost(host, port) io.stdout:write(string.format( "SOCKET ERROR: %s, %s\n", errMsg, errNum)) end + unistd.close(sock) return retCode end end @@ -299,6 +300,7 @@ function InternetDetector:TCPConnectionToHost(host, port) io.stdout:flush() end + socket.shutdown(sock, socket.SHUT_RDWR) unistd.close(sock) retCode = success and 0 or 1 end diff --git a/internet-detector/files/usr/lib/internet-detector/mod_public_ip.lua b/internet-detector/files/usr/lib/internet-detector/mod_public_ip.lua index 652a0c0..52df930 100644 --- a/internet-detector/files/usr/lib/internet-detector/mod_public_ip.lua +++ b/internet-detector/files/usr/lib/internet-detector/mod_public_ip.lua @@ -161,6 +161,7 @@ function Module:sendUDPMessage(message, server, port) io.stdout:write(string.format( "SOCKET ERROR: %s, %s\n", errMsg, errNum)) end + unistd.close(sock) return retCode end end