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.
This commit is contained in:
1 parent
aed95326f3
commit
1e4d7e4462
2 files changed
-5
No files matched your search
@@ -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())
|
||||
|
||||
@@ -60,7 +60,6 @@ type LocalConnection struct {
|
||||
Decryptor Decryptor
|
||||
Router *Router
|
||||
UID uint64
|
||||
shutdown bool
|
||||
queryChan chan<- *ConnectionInteraction
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user