Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
1089-sendfile-Expand-sleep-to-allow-send-to-sta...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1089-sendfile-Expand-sleep-to-allow-send-to-start.patch of Package erlang
From 962e4c7c269a0ee64817387c7378e712f52f55e9 Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Wed, 19 Oct 2022 14:47:09 +0200 Subject: [PATCH 7/9] sendfile: Expand sleep to allow send to start --- lib/kernel/test/sendfile_SUITE.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl index e7bed56510..a3ea7e8d5b 100644 --- a/lib/kernel/test/sendfile_SUITE.erl +++ b/lib/kernel/test/sendfile_SUITE.erl @@ -350,7 +350,9 @@ t_sendfile_recvduring(Config) -> {ok, #file_info{size = Size}} = file:read_file_info(Filename), spawn_link(fun() -> - timer:sleep(50), + %% We sleep to allow file:sendfile to be + %% called before this send. + timer:sleep(10), ok = gen_tcp:send(Sock, <<1>>), {ok,<<1>>} = gen_tcp:recv(Sock, 1) end), @@ -488,10 +490,9 @@ sendfile_send(Host, Send, Orig, SockOpts) -> Opts = [binary,{packet,0}|SockOpts], io:format("connect with opts = ~p\n", [Opts]), {ok, Sock} = gen_tcp:connect(Host, Port, Opts), - Data = case proplists:get_value(arity,erlang:fun_info(Send)) of - 1 -> + Data = if is_function(Send, 1) -> Send(Sock); - 2 -> + is_function(Send, 2) -> Send(Sock, SFServer) end, ok = gen_tcp:close(Sock), -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor