-Removed Close on null failed Listener (hkexshd)

-Removed premature net.Conn.Close() in hkexnet.Close() (hkexnet)

Signed-off-by: Russ Magee <rmagee@gmail.com>
This commit is contained in:
Russ Magee 2018-11-19 14:16:11 -08:00
parent 4345c7bf2d
commit 1909786a4b
2 changed files with 0 additions and 3 deletions

View File

@ -533,7 +533,6 @@ func (hc *Conn) Close() (err error) {
binary.BigEndian.PutUint32(s, uint32(*hc.closeStat)) binary.BigEndian.PutUint32(s, uint32(*hc.closeStat))
log.Printf("** Writing closeStat %d at Close()\n", *hc.closeStat) log.Printf("** Writing closeStat %d at Close()\n", *hc.closeStat)
hc.WritePacket(s, CSOExitStatus) hc.WritePacket(s, CSOExitStatus)
err = (*hc.c).Close()
logger.LogDebug(fmt.Sprintln("[Conn Closing]")) logger.LogDebug(fmt.Sprintln("[Conn Closing]"))
return return
} }

View File

@ -433,8 +433,6 @@ func main() {
conn, err := l.Accept() conn, err := l.Accept()
if err != nil { if err != nil {
log.Printf("Accept() got error(%v), hanging up.\n", err) log.Printf("Accept() got error(%v), hanging up.\n", err)
conn.Close()
//log.Fatal(err)
} else { } else {
log.Println("Accepted client") log.Println("Accepted client")