]> git.giacomolli.uk - onechat/blobdiff - daemon.go
Name subtests for the behavior they prove
[onechat] / daemon.go
index 9f71d801be1c985ee70590e7118e69eeba91abbb..ea253180228d342a5343a3915a6efcbdb88afe18 100644 (file)
--- a/daemon.go
+++ b/daemon.go
@@ -44,9 +44,9 @@ type DaemonClient struct {
        once   sync.Once
 }
 
        once   sync.Once
 }
 
-// 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()
@@ -167,8 +167,8 @@ func (h *DaemonHub) send(client *DaemonClient, event Event) {
        }
 }
 
        }
 }
 
-// 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() {