Skip to content

Commit f983d77

Browse files
committed
all: fix Watch on Linux may fail on first read
1 parent aace85a commit f983d77

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clipboard_linux.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,7 @@ func write(t Format, buf []byte) (<-chan struct{}, error) {
128128
func watch(ctx context.Context, t Format) <-chan []byte {
129129
recv := make(chan []byte, 1)
130130
ti := time.NewTicker(time.Second)
131-
last, err := read(t)
132-
if err != nil {
133-
return nil
134-
}
131+
last := Read(t)
135132
go func() {
136133
for {
137134
select {

0 commit comments

Comments
 (0)