From 06a9cb5d0f568eb5e04b3b87e1352630a07db646 Mon Sep 17 00:00:00 2001 From: Alex Bramley Date: Mon, 8 Apr 2013 18:04:40 +0100 Subject: [PATCH] Give each handler its own copy of *Line. Thanks to Kevin Ballard for the suggestion. --- client/dispatch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/dispatch.go b/client/dispatch.go index 4528503..1af35fb 100644 --- a/client/dispatch.go +++ b/client/dispatch.go @@ -122,7 +122,7 @@ func (hs *hSet) dispatch(conn *Conn, line *Line) { return } for hn := list.start; hn != nil; hn = hn.next { - go hn.Handle(conn, line) + go hn.Handle(conn, line.Copy()) } }