From 2b43b1c28e9ced6c475904604df1c99b78cd8a71 Mon Sep 17 00:00:00 2001
From: Roman Bazalevsky <rvb@rvb.name>
Date: Mon, 3 Dec 2018 19:43:04 +0300
Subject: [PATCH 1/1] =?utf8?q?=D0=A8=D1=82=D0=B0=D1=82=D0=BD=D1=8B=D0=B9?=
 =?utf8?q?=20=D1=81=D0=BF=D0=BE=D1=81=D0=BE=D0=B1=20=D1=80=D0=B0=D0=B1?=
 =?utf8?q?=D0=BE=D1=82=D1=8B=20=D1=81=20=D1=82=D0=B0=D0=B9=D0=BC=D0=B0?=
 =?utf8?q?=D1=83=D1=82=D0=B0=D0=BC=D0=B8=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?=
 =?utf8?q?=D0=B0=D0=B5=D1=82=20=D1=81=D1=82=D0=B0=D0=B1=D0=B8=D0=BB=D1=8C?=
 =?utf8?q?=D0=BD=D0=B5=D0=B5=20=D1=82=D1=80=D0=B0=D0=B4=D0=B8=D1=86=D0=B8?=
 =?utf8?q?=D0=BE=D0=BD=D0=BD=D0=BE=D0=B3=D0=BE=20=D1=81=20=D1=84=D1=83?=
 =?utf8?q?=D0=BD=D0=BA=D1=86=D0=B8=D0=B5=D0=B9=20=D0=BE=D1=82=D0=BA=D1=80?=
 =?utf8?q?=D1=8B=D1=82=D0=B8=D1=8F=20=D1=81=D0=BE=D0=BA=D0=B5=D1=82=D0=B0.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

---
 bin/weathermon | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/bin/weathermon b/bin/weathermon
index cc58def..2314e1a 100755
--- a/bin/weathermon
+++ b/bin/weathermon
@@ -100,12 +100,7 @@ function submitValue(type,id,param,val)
       url = url:gsub("//","//"..web_user..":"..web_pass.."@",1)
     end
 
-    local result,code = http.request ({
-      url=url, create=function()
-        local req_sock = socket.tcp()
-        req_sock:settimeout(web_timeout)
-        return req_sock
-      end})
+    local result,code = http.request (url)
 
     if code ~= 200 and backlog_con then
       printLog("writing record to backlog...")
@@ -336,7 +331,7 @@ end
 
 if web_url then
   http = require("socket.http")
-  socket = require("socket")
+  http.TIMEOUT = web_timeout
 end
 
 if mqtt_host then
-- 
2.34.1