mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-20 14:20:00 -08:00
Create a new server if there are no servers
This commit is contained in:
parent
3c5c71288d
commit
f273b7d328
1 changed files with 10 additions and 0 deletions
10
grumble.go
10
grumble.go
|
|
@ -173,6 +173,16 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(servers) == 0 {
|
||||||
|
s, err := NewServer(1, *host, *port)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Couldn't start server: %s", err.String())
|
||||||
|
}
|
||||||
|
|
||||||
|
servers[s.Id] = s
|
||||||
|
go s.ListenAndMurmur()
|
||||||
|
}
|
||||||
|
|
||||||
if len(servers) > 0 {
|
if len(servers) > 0 {
|
||||||
ticker := time.NewTicker(10e9) // 10 secs
|
ticker := time.NewTicker(10e9) // 10 secs
|
||||||
for {
|
for {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue