Rename client.kill to client.closeLink
This commit is contained in:
		@@ -142,7 +142,7 @@ func initiateShutdown() {
 | 
			
		||||
		log.Println(err)
 | 
			
		||||
	}
 | 
			
		||||
	for c := range clients {
 | 
			
		||||
		c.kill()
 | 
			
		||||
		c.closeLink()
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	shutdownTimer = time.After(3 * time.Second)
 | 
			
		||||
@@ -171,7 +171,7 @@ func (c *client) send(line string) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Tear down the client connection, trying to do so in a graceful manner.
 | 
			
		||||
func (c *client) kill() {
 | 
			
		||||
func (c *client) closeLink() {
 | 
			
		||||
	if c.inShutdown {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
@@ -238,7 +238,7 @@ func (c *client) onRead(data []byte, readErr error) {
 | 
			
		||||
	// TODO: Inform the client about the inQ overrun in the farewell message.
 | 
			
		||||
	// TODO: We should stop receiving any more data from this client.
 | 
			
		||||
	if len(c.inQ) > 8192 {
 | 
			
		||||
		c.kill()
 | 
			
		||||
		c.closeLink()
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -246,7 +246,7 @@ func (c *client) onRead(data []byte, readErr error) {
 | 
			
		||||
		if c.inShutdown {
 | 
			
		||||
			c.destroy()
 | 
			
		||||
		} else {
 | 
			
		||||
			c.kill()
 | 
			
		||||
			c.closeLink()
 | 
			
		||||
		}
 | 
			
		||||
	} else if readErr != nil {
 | 
			
		||||
		log.Println(readErr)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user