From 6caa4ab92831f46ecc6e466de4c24d03176b831b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Sat, 21 Jul 2018 00:27:26 +0200 Subject: [PATCH] Rename client.kill to client.closeLink --- prototypes/tls-autodetect.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prototypes/tls-autodetect.go b/prototypes/tls-autodetect.go index ce88379..50017d5 100644 --- a/prototypes/tls-autodetect.go +++ b/prototypes/tls-autodetect.go @@ -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)