simplify some more

This commit is contained in:
Matthias Radestock committed 2014-12-24 13:38:17 +00:00
1 parent fecbf220cc
commit 1c5d720db4
1 file changed
+3 -6
+3 -6
View File
@@ -178,9 +178,6 @@ func (conn *LocalConnection) queryLoop(queryChan <-chan *ConnectionInteraction,
conn.log("error:", err) conn.log("error:", err)
break break
} }
heartbeat := tickerChan(conn.heartbeat)
fetchAll := tickerChan(conn.fetchAll)
fragTest := tickerChan(conn.fragTest)
select { select {
case query, ok := <-queryChan: case query, ok := <-queryChan:
if !ok { if !ok {
@@ -196,11 +193,11 @@ func (conn *LocalConnection) queryLoop(queryChan <-chan *ConnectionInteraction,
case CSendTCP: case CSendTCP:
err = conn.handleSendTCP(query.payload.([]byte)) err = conn.handleSendTCP(query.payload.([]byte))
} }
case <-heartbeat: case <-tickerChan(conn.heartbeat):
conn.forwardHeartbeatFrame() conn.forwardHeartbeatFrame()
case <-fetchAll: case <-tickerChan(conn.fetchAll):
err = conn.handleSendTCP(ProtocolFetchAllByte) err = conn.handleSendTCP(ProtocolFetchAllByte)
case <-fragTest: case <-tickerChan(conn.fragTest):
conn.setStackFrag(false) conn.setStackFrag(false)
err = conn.handleSendTCP(ProtocolStartFragmentationTestByte) err = conn.handleSendTCP(ProtocolStartFragmentationTestByte)