More work related with #1557, now avoiding the issue with close() dead-lock