forked from External/grumble
Rename Client's goroutines.
This commit is contained in:
parent
83fe0c737e
commit
4114a83d64
2 changed files with 7 additions and 10 deletions
12
client.go
12
client.go
|
|
@ -288,8 +288,8 @@ func (client *Client) sendPermissionDeniedFallback(denyType mumbleproto.Permissi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// UDP receiver.
|
// UDP receive loop
|
||||||
func (client *Client) udpreceiver() {
|
func (client *Client) udpRecvLoop() {
|
||||||
for buf := range client.udprecv {
|
for buf := range client.udprecv {
|
||||||
// Received a zero-valued buffer. This means that the udprecv
|
// Received a zero-valued buffer. This means that the udprecv
|
||||||
// channel was closed, so exit cleanly.
|
// channel was closed, so exit cleanly.
|
||||||
|
|
@ -408,8 +408,8 @@ func (client *Client) sendMessage(msg interface{}) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Receiver Goroutine
|
// TLS receive loop
|
||||||
func (client *Client) receiver() {
|
func (client *Client) tlsRecvLoop() {
|
||||||
for {
|
for {
|
||||||
// The version handshake is done, the client has been authenticated and it has received
|
// The version handshake is done, the client has been authenticated and it has received
|
||||||
// all necessary information regarding the server. Now we're ready to roll!
|
// all necessary information regarding the server. Now we're ready to roll!
|
||||||
|
|
@ -513,10 +513,6 @@ func (client *Client) receiver() {
|
||||||
client.OSVersion = *version.OsVersion
|
client.OSVersion = *version.OsVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
client.Printf("version = 0x%x", client.Version)
|
|
||||||
client.Printf("os = %s %s", client.OSName, client.OSVersion)
|
|
||||||
client.Printf("client = %s", client.ClientName)
|
|
||||||
|
|
||||||
client.state = StateClientSentVersion
|
client.state = StateClientSentVersion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -278,8 +278,9 @@ func (server *Server) handleIncomingClient(conn net.Conn) (err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
go client.receiver()
|
// Launch network readers
|
||||||
go client.udpreceiver()
|
go client.tlsRecvLoop()
|
||||||
|
go client.udpRecvLoop()
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue