Correct closing of connections

This commit is contained in:
9seconds
2019-10-10 21:07:55 +03:00
parent d10729490d
commit 56cf90b13d
3 changed files with 16 additions and 9 deletions
+1
View File
@@ -52,6 +52,7 @@ func (c *connection) write(packet conntypes.Packet) error {
func (c *connection) shutdown() {
c.shutdownOnce.Do(func() {
c.conn.Close()
close(c.done)
c.hub.channelBrokenSockets <- c.id
})