Do not log every tcp connect/disconnect
leaving as comments for whenever I rig up global debug logging. closes #1062
This commit is contained in:
parent
f1c995dcb8
commit
2f7da03cce
|
@ -150,8 +150,7 @@ func (t *TcpListener) tcpListen() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// log.Printf("Received TCP Connection from %s", conn.RemoteAddr())
|
||||||
log.Printf("Received TCP Connection from %s", conn.RemoteAddr())
|
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-t.accept:
|
case <-t.accept:
|
||||||
|
@ -187,7 +186,7 @@ func (t *TcpListener) handler(conn *net.TCPConn, id string) {
|
||||||
defer func() {
|
defer func() {
|
||||||
t.wg.Done()
|
t.wg.Done()
|
||||||
conn.Close()
|
conn.Close()
|
||||||
log.Printf("Closed TCP Connection from %s", conn.RemoteAddr())
|
// log.Printf("Closed TCP Connection from %s", conn.RemoteAddr())
|
||||||
// Add one connection potential back to channel when this one closes
|
// Add one connection potential back to channel when this one closes
|
||||||
t.accept <- true
|
t.accept <- true
|
||||||
t.forget(id)
|
t.forget(id)
|
||||||
|
|
Loading…
Reference in New Issue