Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Make a closed SSH server stop before it returns

786d7ce1a17ddb2224cefedbe73564cc8165ca32 · Keenan Nemetz · 2d ago · parent f642e0aa

Make a closed SSH server stop before it returns

CI caught the new concurrency test failing on a temporary directory that was not
empty: a connection handler was still finishing a disconnect when the test harness
removed the directory it had handed the server. The test was the trigger, not the
cause — Close() only closed the listener and left every handler and session
goroutine running.

Close now ends the connections it is serving and waits for their goroutines, so
"closed" means nothing this server started is still writing. The wait is bounded
(10s) and reported, because a git process stuck on a dead filesystem must not hold
up a shutdown. A parked lease answers on Close as well, rather than making the
wait sit out its 25-second window.

Refs: 01M6SQ7WC68KGP57MN1DS3DFPQ (#220)

server/ssh/runner.go +1

@@ -338,6 +338,7 @@ func (s *Server) serveRunner(ch xssh.Channel, user string) {
338 338 select {
339 339 case <-wake:
340 340 case <-time.After(wait):
341 case <-s.done:
341 342 }
342 343 // Ask again rather than assume: the wake-up may belong to a job another
343 344 // runner took first, and a lease is the only thing that hands work out.