diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-08-24 19:49:58 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-08-24 19:49:58 +0200 |
commit | 994bed45a8c8f6833acbdb9250eb4ad531717111 (patch) | |
tree | 85694804db8fdd4b0ed3d9c0c92e87740b7af3d4 /tex/context/base/mkiv/util-soc-imp-socket.lua | |
parent | 990e593fc4ae1da7568f52ba2c61539ba4e79069 (diff) | |
download | context-994bed45a8c8f6833acbdb9250eb4ad531717111.tar.gz |
2018-08-24 19:26:00
Diffstat (limited to 'tex/context/base/mkiv/util-soc-imp-socket.lua')
-rw-r--r-- | tex/context/base/mkiv/util-soc-imp-socket.lua | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/util-soc-imp-socket.lua b/tex/context/base/mkiv/util-soc-imp-socket.lua index 0ad685d75..424b08e8f 100644 --- a/tex/context/base/mkiv/util-soc-imp-socket.lua +++ b/tex/context/base/mkiv/util-soc-imp-socket.lua @@ -12,8 +12,13 @@ local tcp4 = socket.tcp4 local tcp6 = socket.tcp6 local getaddrinfo = socket.dns.getaddrinfo -local report = logs and logs.reporter("socket") or function(fmt,first,...) - if fmt then +local defaulthost = "0.0.0.0" + +local function report(fmt,first,...) + if logs then + report = logs and logs.reporter("socket") + report(fmt,first,...) + elseif fmt then fmt = "socket: " .. fmt if first then print(format(fmt,first,...)) @@ -181,10 +186,8 @@ sourcet["default"] = sourcet["until-closed"] socket.source = socket.choose(sourcet) -if logs then - _G.socket = socket - package.loaded.socket = socket - -- report("module (re)installed") -end +_G.socket = socket -- for now global + +package.loaded.socket = socket return socket |