changeset 116:58c641fa31ba

Move timer handle safety into the Timer_disconnect() binding.
author Brian Smith <brian@dbsoft.org>
date Fri, 12 Nov 2021 05:27:13 -0600
parents 9c5c4f4769b8
children 8727f47ee3ce
files dw/dw.go
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dw/dw.go	Fri Nov 12 04:59:06 2021 -0600
+++ b/dw/dw.go	Fri Nov 12 05:27:13 2021 -0600
@@ -2866,6 +2866,7 @@
 func Timer_disconnect(id HTIMER) {
 	if id.tid > 0 {
 		C.go_timer_disconnect(C.uintptr_t(id.tid))
+		id.tid = 0
 	}
 }