Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clipboard_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func watch(ctx context.Context, t Format) <-chan []byte {
ti := time.NewTicker(time.Second)
last := Read(t)
go func() {
defer ti.Stop()
for {
select {
case <-ctx.Done():
Expand Down
1 change: 1 addition & 0 deletions clipboard_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func watch(ctx context.Context, t Format) <-chan []byte {
ti := time.NewTicker(time.Second)
lastCount := C.long(C.clipboard_change_count())
go func() {
defer ti.Stop()
for {
select {
case <-ctx.Done():
Expand Down
1 change: 1 addition & 0 deletions clipboard_ios.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func watch(ctx context.Context, t Format) <-chan []byte {
ti := time.NewTicker(time.Second)
last := Read(t)
go func() {
defer ti.Stop()
for {
select {
case <-ctx.Done():
Expand Down
1 change: 1 addition & 0 deletions clipboard_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func watch(ctx context.Context, t Format) <-chan []byte {
ti := time.NewTicker(time.Second)
last := Read(t)
go func() {
defer ti.Stop()
for {
select {
case <-ctx.Done():
Expand Down
1 change: 1 addition & 0 deletions clipboard_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ func watch(ctx context.Context, t Format) <-chan []byte {
go func() {
// not sure if we are too slow or the user too fast :)
ti := time.NewTicker(time.Second)
defer ti.Stop()
cnt, _, _ := getClipboardSequenceNumber.Call()
ready <- struct{}{}
for {
Expand Down
Loading