It works now i added the ReadDeadline, thanks for the help :-)
Perry
On Wednesday, March 31, 2021 at 1:22:20 PM UTC+2 Brian Candler wrote:
> I think that in principle you are correct to perform your reads inside a
> goroutine, to allow them to be received asynchronously.
>
> If Read() blocks, it's not a problem unless you want to shut down the
> connection from the server side, and you can do that by setting a read
> timeout which will unblock the read:
>
> go func() {
> select {
> case <-RecieverClose: // sic
> conn.SetReadDeadline(time.Now())
> }
> }()
>
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/8f4fab08-8a26-4a41-9923-3a0263e77bean%40googlegroups.com.