Remove small window where connection leaks could happen.