Project

General

Profile

segv-test-socket-test_socket.rb.patch

MSP-Greg (Greg L), 09/01/2017 02:37 AM

View differences:

test/socket/test_socket.rb
532 532
    server = TCPServer.new("localhost", 0)
533 533
    serv_thread = Thread.new {server.accept}
534 534
    begin sleep(0.1) end until serv_thread.stop?
535
    sock = TCPSocket.new("localhost", server.addr[1])
536
    client_thread = Thread.new do
537
      sock.readline
538
    end
535
    sock = TCPSocket.new("localhost", server.addr[1]) ; sock.autoclose = false
536
    client_thread = Thread.new {sock.readline}
539 537
    begin sleep(0.1) end until client_thread.stop?
540 538
    Timeout.timeout(1) do
541 539
      sock.close