Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile: net.UDPConn.ReadFromUDP don't return error when i use net.UDPConn.Close() #25839

Open
happyEgg opened this issue Jun 12, 2018 · 4 comments

Comments

@happyEgg
Copy link

@happyEgg happyEgg commented Jun 12, 2018

Please answer these questions before submitting your issue. Thanks!
I'm trying to ship a golang binary inside a android app
conn, err := net.DialUDP("udp", nil, raddr)
if err != nil{
//xxxx
}

size, raddr, err1 := conn.ReadFromUDP(buffer[:])

It's working。but when i use conn.Close(),err1 don't return error,it's waiting for ReadFromUDP
iPhone is ok.

What version of Go are you using (go version)?

go1.10.2

gomobile is last

@bcmills
Copy link
Member

@bcmills bcmills commented Jun 12, 2018

There is not enough information in this report to diagnose the issue. Please include a complete, self-contained code example if possible, ideally as a runnable program in the playground.

@bcmills
Copy link
Member

@bcmills bcmills commented Jun 12, 2018

@eliasnaur
Copy link
Contributor

@eliasnaur eliasnaur commented Jun 12, 2018

Apart from the self-contained example, is this reproducible on a regular Linux?

@happyEgg
Copy link
Author

@happyEgg happyEgg commented Jun 13, 2018

I also use it on android and iOS,iOS is ok,but android don't return error。I guess that the bottom of Android don't return error code

@FiloSottile FiloSottile changed the title gomobile: net.UDPConn.ReadFromUDP don't return error when i use net.UDPConn.Close() x/mobile: net.UDPConn.ReadFromUDP don't return error when i use net.UDPConn.Close() Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.