We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
v0.10.7
Run example code
import ( "net/http" "github.com/caddyserver/certmagic" "fmt" "log" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { fmt.Fprintf(w, "Hello world") }) err := certmagic.HTTPS([]string{"tmp.mydomain.com"}, nil) if err != nil { log.Fatal(err) } }
Sometimes the example code works, sometimes it panics like this:
2020/04/05 00:21:57 [INFO][tmp.mydomain.com] Obtain certificate; acquiring lock... 2020/04/05 00:21:57 [INFO][tmp.mydomain.com] Obtain: Lock acquired; proceeding... 2020/04/05 00:21:57 [INFO] acme: Registering account for dude@mydomain.com 2020/04/05 00:21:57 [INFO][tmp.mydomain.com] Waiting on rate limiter... 2020/04/05 00:21:57 [INFO][tmp.mydomain.com] Done waiting 2020/04/05 00:21:57 [INFO] [tmp.mydomain.com] acme: Obtaining bundled SAN certificate given a CSR 2020/04/05 00:21:57 [INFO] [tmp.mydomain.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/3765978543 2020/04/05 00:21:57 [INFO] [tmp.mydomain.com] acme: use tls-alpn-01 solver 2020/04/05 00:21:57 [INFO] [tmp.mydomain.com] acme: Trying to solve TLS-ALPN-01 2020/04/05 00:21:58 [INFO][tmp.mydomain.com] Served key authentication certificate (TLS-ALPN challenge) 2020/04/05 00:21:58 [INFO][tmp.mydomain.com] Served key authentication certificate (TLS-ALPN challenge) 2020/04/05 00:21:58 [INFO][tmp.mydomain.com] Served key authentication certificate (TLS-ALPN challenge) 2020/04/05 00:21:58 [INFO][tmp.mydomain.com] Served key authentication certificate (TLS-ALPN challenge) 2020/04/05 00:22:04 [INFO] [tmp.mydomain.com] The server validated our request panic: close of closed channel panic: close of closed channel panic: close of closed channel panic: close of closed channel goroutine 29 [running]: github.com/caddyserver/certmagic.(*tlsALPNSolver).Present.func1(0xc0000f5da0, 0xc000326cc0) /home/x/go/pkg/mod/github.com/caddyserver/certmagic@v0.10.7/solvers.go:155 +0x177 created by github.com/caddyserver/certmagic.(*tlsALPNSolver).Present /home/x/go/pkg/mod/github.com/caddyserver/certmagic@v0.10.7/solvers.go:149 +0x709
Out of curiosity, I built the code both with the datarace detector enabled and disabled, and I can reproduce the issue (intermittently) in both cases.
The text was updated successfully, but these errors were encountered:
Thanks for the report, but this is fixed already. 😃 Simply upgrade to the latest version.
Sorry, something went wrong.
No branches or pull requests
What version of the package are you using?
v0.10.7
What are you trying to do?
Run example code
What steps did you take?
What did you expect to happen, and what actually happened instead?
Sometimes the example code works, sometimes it panics like this:
How do you think this should be fixed?
Out of curiosity, I built the code both with the datarace detector enabled and disabled, and I can reproduce the issue (intermittently) in both cases.
The text was updated successfully, but these errors were encountered: