Use close_conn(ctx, client) instead of client.Close()

client.Close() doesn't dispatch any even, nor allows some kind of teardown code when a client is disconnected. Use close_conn(ctx, client) instead.