Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'develop'

  • Loading branch information...
commit b3eae684d0bcf863ca1f902f5cb26fc6fd9ad43a 2 parents 76c7187 + df6d728
@icarus75 icarus75 authored
View
2  openwrt/package/flukso/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=flukso
-PKG_VERSION:=2.1.2
+PKG_VERSION:=2.1.3
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
View
6 openwrt/package/flukso/luasrc/fluksod.lua
@@ -83,9 +83,9 @@ local LAN_INTERVAL = 0
local LAN_POLISH_CUTOFF = 60
local LAN_PUBLISH_PATH = DAEMON_PATH .. '/sensor'
-local LAN_FACTOR = { ['electricity'] = 3.6e6, -- 1 Wh/ms = 3.6e6 W
- ['water'] = 86.6e6, -- 1 L/ms = 24 * 3.6e6 L/day
- ['gas'] = 86.6e6 } -- 1 L/ms = 24 * 3.6e6 L/day
+local LAN_FACTOR = { ['electricity'] = 3.6e6, -- 1 Wh/ms = 3.6e6 W
+ ['water'] = 24 * 3.6e6, -- 1 L/ms = 24 * 3.6e6 L/day
+ ['gas'] = 24 * 3.6e6 } -- 1 L/ms = 24 * 3.6e6 L/day
local LAN_ID_TO_FACTOR = { }
uci:foreach('flukso', 'sensor', function(x) LAN_ID_TO_FACTOR[x.id] = LAN_FACTOR[x['type']] end)
View
9 openwrt/package/luci/libs/httpclient/luasrc/httpclient.lua
@@ -118,7 +118,14 @@ function create_persistent()
local status, response, buffer, sock
local function yield(...)
- if options.headers["Connection"] == "close" then
+ -- request_raw() will only return a socket userdatum after a successful call
+ -- a nil socket value implies that the socket has already been closed and
+ -- thus cannot be re-used for future calls
+ --
+ -- so the only case where we have to explicitely close the socket is when
+ -- the Connection header says so and a non-nil socket userdatum is returned
+ -- by request_raw()
+ if sock and options.headers["Connection"] == "close" then
sock:close()
end
Please sign in to comment.
Something went wrong with that request. Please try again.