mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 23:34:02 +03:00
Correct closing of connections
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user