refact: refactored module status checks in Configure methods for consistency

This commit is contained in:
evilsocket 2018-03-07 12:47:15 +01:00
parent a8e6b497a3
commit 1e7d99433e
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
13 changed files with 52 additions and 53 deletions

View file

@ -89,6 +89,10 @@ func (httpd *HttpServer) Configure() error {
var certFile string
var keyFile string
if httpd.Running() == true {
return session.ErrAlreadyStarted
}
if err, path = httpd.StringParam("http.server.path"); err != nil {
return err
}
@ -145,9 +149,7 @@ func (httpd *HttpServer) Configure() error {
}
func (httpd *HttpServer) Start() error {
if httpd.Running() == true {
return session.ErrAlreadyStarted
} else if err := httpd.Configure(); err != nil {
if err := httpd.Configure(); err != nil {
return err
}