detect EOF on socket and cleanly shutdown the service process

This commit is contained in:
Joey Hess 2016-11-21 21:45:56 -04:00
parent 483dbcdbef
commit 2da338bb8d
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
2 changed files with 3 additions and 2 deletions

View file

@ -47,3 +47,4 @@ server th@(TransportHandle (LocalRepo r) _) = do
h <- torHandle conn
_ <- runNetProtoHandle h h r (serve u)
hClose h
debugM "remotedaemon" "done handling a connection"