small tweaks

This commit is contained in:
Miek Gieben 2012-08-29 09:59:08 +02:00
parent 9255ad61ac
commit 1f29674505
1 changed files with 9 additions and 6 deletions

View File

@ -342,13 +342,16 @@ func (c *conn) serve() {
}
break
}
// quite elaborate, but this was the original c.close() function
if c._TCP != nil {
c._TCP.Close()
c._TCP = nil
}
if c._UDP != nil {
c._UDP.Close()
c._UDP = nil
switch {
case c._UDP != nil:
c._UDP.Close()
c._UDP = nil
case c._TCP != nil:
c._TCP.Close()
c._TCP = nil
}
}
}