luvit / luvit

Lua + libUV + jIT = pure awesomesauce

Home Page:https://luvit.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connection refused when run examples/http-server-todo-web.lua

lalawue opened this issue · comments

I use luvit-2.14.2 from brew install under MacOS 10.12.6, with '$ luvit http-server-todo-web.lua'

the browser fail to load the page after few minites and curl shows 'Connection refused'.

no more log in http.creatServer onRequest callback.

Works as expected for me on Windows. Maybe it's a firewall issue of some sort?

What happens if you run luvit tests/test-http-client-server.lua inside a cloned luvit repo?

In brew version, It works fine on the beginning, then fail after few minutes.

I cloned the latest version, but hard to downloading, so I opened the issue.


% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 126 100 126 0 0 74 0 0:00:01 0:00:01 --:--:-- 74
100 567 100 567 0 0 221 0 0:00:02 0:00:02 --:--:-- 0
Downloading https://github.com/luvit/luvi/releases/download/v2.7.6/luvi-regular-Darwin_x86_64 to luvi
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 616 0 616 0 0 701 0 --:--:-- --:--:-- --:--:-- 700
0 3696k 0 16360 0 0 689 0 1:31:33 0:00:23 1:31:10 3

I add proxy for curl in Makefile, and lit/get-lit.sh, get luvi binary for latest cloned luvit repo.

The 'luvi . -- tests/run.lua' show 'All test passed', but same result.

No firewall for the port, other program running in the same addr '127.0.0.1:8080', works fine after half an hour, not the system's problem.


the 'examples/tcp-echo-server-raw.lua' works fine after half an hour.