A small fix for offline server tests

This commit is contained in:
Makis Maropoulos 2016-06-04 23:11:22 +03:00
parent 26ef396959
commit 1a9102706b

View File

@ -76,7 +76,7 @@ func (s *Server) Hostname() (hostname string) {
} else { } else {
fullhost := s.Config.ListeningAddr fullhost := s.Config.ListeningAddr
if idx := strings.IndexByte(fullhost, ':'); idx > 1 { // at least after second char if idx := strings.IndexByte(fullhost, ':'); idx > 1 { // at least after second char
hostname = hostname[0 : idx-1] hostname = hostname[0:idx]
} else { } else {
hostname = "0.0.0.0" hostname = "0.0.0.0"
} }