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 {
fullhost := s.Config.ListeningAddr
if idx := strings.IndexByte(fullhost, ':'); idx > 1 { // at least after second char
hostname = hostname[0 : idx-1]
hostname = hostname[0:idx]
} else {
hostname = "0.0.0.0"
}