Commit 8df86e84 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b4857f66
...@@ -622,7 +622,8 @@ func parseWatchFrame(line string) (stream uint64, msg string, err error) { ...@@ -622,7 +622,8 @@ func parseWatchFrame(line string) (stream uint64, msg string, err error) {
return 0, "", fmt.Errorf("invalid stream") return 0, "", fmt.Errorf("invalid stream")
} }
return stream, line[sp+1:], nil msg = strings.TrimSuffix(line[sp+1:], "\n")
return stream, msg, nil
} }
// parseWatch parses watch request wcfs received over /head/watch. // parseWatch parses watch request wcfs received over /head/watch.
...@@ -637,7 +638,6 @@ func parseWatch(msg string) (oid zodb.Oid, at zodb.Tid, err error) { ...@@ -637,7 +638,6 @@ func parseWatch(msg string) (oid zodb.Oid, at zodb.Tid, err error) {
} }
}() }()
msg = strings.TrimSuffix(msg, "\n")
if !strings.HasPrefix(msg, "watch ") { if !strings.HasPrefix(msg, "watch ") {
return 0, 0, fmt.Errorf("not a watch request") return 0, 0, fmt.Errorf("not a watch request")
} }
......
...@@ -1416,7 +1416,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T ...@@ -1416,7 +1416,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
} }
err = wg.Wait() err = wg.Wait()
if err != nil { if err != nil {
panic(err) // XXX return err
} }
return nil return nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment