Browse Source

Fixes RunTLS() implementation

- thanks @Dal-Papa
Manu Mtz-Almeida 10 years ago
parent
commit
b96f68ce7b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      gin.go

+ 2 - 2
gin.go

@@ -171,11 +171,11 @@ func (engine *Engine) Run(addr string) (err error) {
 	return
 }
 
-func (engine *Engine) RunTLS(addr string, cert string, key string) (err error) {
+func (engine *Engine) RunTLS(addr string, certFile string, keyFile string) (err error) {
 	debugPrint("Listening and serving HTTPS on %s\n", addr)
 	defer func() { debugPrintError(err) }()
 
-	err = http.ListenAndServe(addr, engine)
+	err = http.ListenAndServeTLS(addr, certFile, keyFile, engine)
 	return
 }