zubairhamed / canopus

CoAP Client/Server implementing RFC 7252 for the Go Language
Apache License 2.0
154 stars 41 forks source link

canopus leaking goroutines #85

Open cbrake opened 7 years ago

cbrake commented 7 years ago

Hi, with the simple client/server example, it seems canopus is leaking goroutines. Am I doing something wrong? (I added a simple loop that prints the goroutine count every 5s)

goroutine count: 11 goroutine count: 11 goroutine count: 11 goroutine count: 11 goroutine count: 11 goroutine count: 11 2017/02/13 12:16:01 Hello Called goroutine count: 12 [= = = = = = = = = = = = = = = = ] [Code: 69] [Code String: 205 Content] [MessageId: 18620] [MessageType: 2] [Token: YLBEvusD] [Token Length: 8] [Payload: Acknowledged with response : Hello, canopus] [ - - - OPTIONS - - - ] [None] [= = = = = = = = = = = = = = = = ] goroutine count: 12 2017/02/13 12:16:05 Hello Called goroutine count: 13 [= = = = = = = = = = = = = = = = ] [Code: 69] [Code String: 205 Content] [MessageId: 4888] [MessageType: 2] [Token: Hn0x7bvI] [Token Length: 8] [Payload: Acknowledged with response : Hello, canopus] [ - - - OPTIONS - - - ] [None] [= = = = = = = = = = = = = = = = ] goroutine count: 13