|
22 | 22 | server = HTTP.serve!("0.0.0.0", _port; verbose = -1, listenany=true, sslconfig=sslconfig) do req |
23 | 23 | HTTP.Response(200, ["Content-Encoding" => "gzip"], gzip_data("dummy response")) |
24 | 24 | end |
25 | | - # listenany allows changing port if that one is already in use, so check the actual port |
26 | | - _port = HTTP.port(server) |
27 | | - url = "https://localhost:$_port" |
28 | | - |
29 | | - env = ["JULIA_NO_VERIFY_HOSTS" => "localhost", |
30 | | - "JULIA_SSL_NO_VERIFY_HOSTS" => nothing, |
31 | | - "JULIA_ALWAYS_VERIFY_HOSTS" => nothing] |
32 | | - withenv(env...) do |
33 | | - @compile_workload begin |
34 | | - HTTP.get(url); |
| 25 | + try |
| 26 | + # listenany allows changing port if that one is already in use, so check the actual port |
| 27 | + _port = HTTP.port(server) |
| 28 | + url = "https://localhost:$_port" |
| 29 | + |
| 30 | + env = ["JULIA_NO_VERIFY_HOSTS" => "localhost", |
| 31 | + "JULIA_SSL_NO_VERIFY_HOSTS" => nothing, |
| 32 | + "JULIA_ALWAYS_VERIFY_HOSTS" => nothing] |
| 33 | + |
| 34 | + withenv(env...) do |
| 35 | + @compile_workload begin |
| 36 | + HTTP.get(url); |
| 37 | + end |
35 | 38 | end |
| 39 | + finally |
| 40 | + HTTP.forceclose(server) |
| 41 | + yield() # needed on 1.9 to avoid some issue where it seems a task doesn't stop before serialization |
| 42 | + server = nothing |
36 | 43 | end |
37 | | - |
38 | | - HTTP.forceclose(server) |
39 | | - yield() # needed on 1.9 to avoid some issue where it seems a task doesn't stop before serialization |
40 | | - server = nothing |
41 | 44 | end |
42 | 45 | catch e |
43 | 46 | @info "Ignoring an error that occurred during the precompilation workload" exception=(e, catch_backtrace()) |
|
0 commit comments