Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multithreaded TCPServer crashes immediately #64

Open
Gundolf68 opened this issue Mar 5, 2020 · 0 comments
Open

Multithreaded TCPServer crashes immediately #64

Gundolf68 opened this issue Mar 5, 2020 · 0 comments

Comments

@Gundolf68
Copy link

Was: mruby/mruby#4949

This:

server = TCPServer.open(8000)    
loop do                          
	Thread.start(server.accept) do |client|
		client.write "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nConnection: close\r\nContent-Length: 11\r\n\r\nHello world"
		client.close                  
	end
end

on Ubuntu 18.04.
At the first request, the program exits with a Segmentation fault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant