scala,tcp,spray,so-linger
You can set a Connection("close") header on the response. Spray-can will then close the connection.