It appears calling `close` hangs if the connection is already terminated. I have not independently tested this, it's just via empirical evidence.