-// Accept serves each client of listener until the listener closes. A new
-// client gets a ready event with the name of the agent, and a busy event when a
-// turn runs.
+// Accept serves each client of listener until the listener closes. A new client
+// gets a ready event with the name of the agent, and a busy event when a turn
+// runs.
func (h *DaemonHub) Accept(ctx context.Context, listener net.Listener, l *TurnLoop) {
for {
conn, err := listener.Accept()
func (h *DaemonHub) Accept(ctx context.Context, listener net.Listener, l *TurnLoop) {
for {
conn, err := listener.Accept()
-// remove removes client, closes its connection, and ends its writer. The
-// caller holds the mutex.
+// remove removes client, closes its connection, and ends its writer. The caller
+// holds the mutex.
func (h *DaemonHub) remove(client *DaemonClient) {
delete(h.clients, client)
client.once.Do(func() {
func (h *DaemonHub) remove(client *DaemonClient) {
delete(h.clients, client)
client.once.Do(func() {