tiny refactor
This commit is contained in:
1 parent
3765d23825
commit
873c95a602
1 file changed
+3
-2
@@ -172,7 +172,7 @@ func (conn *LocalConnection) run(queryChan <-chan *ConnectionInteraction, accept
|
||||
}
|
||||
log.Printf("->[%s] completed handshake with %s\n", conn.remoteTCPAddr, conn.remote.Name)
|
||||
|
||||
go conn.receiveTCP(dec, conn.Router.UsingPassword())
|
||||
go conn.receiveTCP(dec)
|
||||
conn.Router.Ourself.AddConnection(conn)
|
||||
|
||||
if conn.remoteUDPAddr != nil {
|
||||
@@ -435,8 +435,9 @@ func checkHandshakeStringField(fieldName string, expectedValue string, handshake
|
||||
return val, nil
|
||||
}
|
||||
|
||||
func (conn *LocalConnection) receiveTCP(decoder *gob.Decoder, usingPassword bool) {
|
||||
func (conn *LocalConnection) receiveTCP(decoder *gob.Decoder) {
|
||||
defer conn.Decryptor.Shutdown()
|
||||
usingPassword := conn.SessionKey != nil
|
||||
var receiver TCPReceiver
|
||||
if usingPassword {
|
||||
receiver = NewEncryptedTCPReceiver(conn)
|
||||
|
||||
Reference in new issue
Block a user