Search code examples
scalatcpsprayso-linger

Scala spray immediately close connection after send answer


How scala spray immediately close connection after send answe?

In other http server Im set tcp optionsso_linger` = 0

Where I can set so_linger param in spray_can?


Solution

  • You can set a Connection("close") header on the response. Spray-can will then close the connection.