This commit is contained in:
Liang Ding 2014-11-20 00:17:59 +08:00
parent ae6c14b16f
commit eb8e5133ab
1 changed files with 6 additions and 4 deletions

View File

@ -31,7 +31,9 @@ type WSChannel struct {
// Close closed the channel.
func (c *WSChannel) Close() {
c.Conn.Close()
if nil != c.Conn {
c.Conn.Close()
}
}
// Refresh refreshes the channel by updating its use time.