diff options
author | Přemysl Janouch <p@janouch.name> | 2018-07-21 00:27:26 +0200 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-07-21 00:27:26 +0200 |
commit | 6caa4ab92831f46ecc6e466de4c24d03176b831b (patch) | |
tree | 65b15bd61d0f200ee2d9ecd1f2ac475cd9badac3 /prototypes | |
parent | 728fa4e54800a505d7fac1b4a4b83862a30f94b2 (diff) | |
download | haven-6caa4ab92831f46ecc6e466de4c24d03176b831b.tar.gz haven-6caa4ab92831f46ecc6e466de4c24d03176b831b.tar.xz haven-6caa4ab92831f46ecc6e466de4c24d03176b831b.zip |
Rename client.kill to client.closeLink
Diffstat (limited to 'prototypes')
-rw-r--r-- | prototypes/tls-autodetect.go | 8 |
1 files 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) |