I am the world's biggest moron.

of course there's a race condition, if you close the bloody socket before
setting the state to conn_closed. The amount of time I looked straight at it
and didn't see it is causing me physical pain.