Fix data race when reading conn.isClosed
Merge pull request #142 from Zariel/fix-isclosed-data-race

Fix data race when reading conn.isClosed