From 1e4d7e4462ae4378a9f32f3a4171148a8265ae43 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 12 Jan 2015 18:39:25 +0000 Subject: [PATCH] refactor: remove superfluous var conn.shutdown was only set/accessed in handleShutdown, which in turn is only called on termination of queryLoop and hence multiple invocations are impossible. --- router/connection.go | 4 ---- router/types.go | 1 - 2 files changed, 5 deletions(-) diff --git a/router/connection.go b/router/connection.go index 93e860f1..6a9564c2 100644 --- a/router/connection.go +++ b/router/connection.go @@ -269,10 +269,6 @@ func (conn *LocalConnection) handleShutdown() { // (or write elements which are only read by the same // process). Taking locks is only done for elements which are read // by other processes. - if conn.shutdown { - return - } - conn.shutdown = true if conn.TCPConn != nil { checkWarn(conn.TCPConn.Close()) diff --git a/router/types.go b/router/types.go index 5c236c24..616e364b 100644 --- a/router/types.go +++ b/router/types.go @@ -60,7 +60,6 @@ type LocalConnection struct { Decryptor Decryptor Router *Router UID uint64 - shutdown bool queryChan chan<- *ConnectionInteraction }