Use existing function to close connection
Let terminate/2 close direct client connection
Inline stop and close_connection
merge bug26189 into stable (again)
merge stable into default