Browse Source

- update readme
- return error if can't bind

flashmob 9 years ago
parent
commit
12cadf5870
2 changed files with 4 additions and 1 deletions
  1. 2 0
      README.md
  2. 2 1
      goguerrilla.go

+ 2 - 0
README.md

@@ -194,6 +194,8 @@ http://jsonlint.com/#
 
 Releases
 =========================================================
+1.5.1 - 4nd Nov 2016
+- Small optimizations to the way email is saved
 
 1.5 - 2nd Nov 2016
 - Fixed a DoS vulnerability, stop reading after an input limit is reached

+ 2 - 1
goguerrilla.go

@@ -64,7 +64,7 @@ func initialise() {
 	return
 }
 
-func runServer(sConfig ServerConfig) {
+func runServer(sConfig ServerConfig) (err error) {
 	server := SmtpdServer{Config: sConfig, sem: make(chan int, sConfig.Max_clients)}
 
 	// setup logging
@@ -92,6 +92,7 @@ func runServer(sConfig ServerConfig) {
 	listener, err := net.Listen("tcp", sConfig.Listen_interface)
 	if err != nil {
 		server.logln(2, fmt.Sprintf("Cannot listen on port, %v", err))
+		return err
 	} else {
 		server.logln(1, fmt.Sprintf("Listening on tcp %s", sConfig.Listen_interface))
 	}