mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-20 06:10:00 -08:00
Add a running state to the server object
This commit is contained in:
parent
f25751d1aa
commit
8ff0a15bcf
1 changed files with 4 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ type Server struct {
|
|||
address string
|
||||
port int
|
||||
udpconn *net.UDPConn
|
||||
running bool
|
||||
|
||||
incoming chan *Message
|
||||
udpsend chan *Message
|
||||
|
|
@ -100,6 +101,7 @@ func NewServer(id int64, addr string, port int) (s *Server, err os.Error) {
|
|||
s.Id = id
|
||||
s.address = addr
|
||||
s.port = port
|
||||
s.running = false
|
||||
|
||||
s.clients = make(map[uint32]*Client)
|
||||
s.Users = make(map[uint32]*User)
|
||||
|
|
@ -995,6 +997,8 @@ func (s *Server) ListenAndMurmur() {
|
|||
// Launch the event handler goroutine
|
||||
go s.handler()
|
||||
|
||||
s.running = true
|
||||
|
||||
// Setup our UDP listener and spawn our reader and writer goroutines
|
||||
s.SetupUDP()
|
||||
go s.ListenUDP()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue