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

client can not recreate connection with coap server #131

Closed
ls327782081 opened this issue Jun 16, 2020 · 5 comments · Fixed by #132
Closed

client can not recreate connection with coap server #131

ls327782081 opened this issue Jun 16, 2020 · 5 comments · Fixed by #132
Labels
bug Something isn't working

Comments

@ls327782081
Copy link

i can not find how to release ClientConn in server's conns.when client down, the server can not write response to client than it use cancle function but the ClientConn still in server's conns. The next time, client recreate connection with the server, the server do not create ClientConn but get it from server's conns,it cause ClientConn's context is cancle

@jkralik
Copy link
Member

jkralik commented Jun 16, 2020

Hi.

  • How did you initialize server - which paramters -> Is it keepalive enabled ?
  • Could you create a test for reproduce the issue / a sample code ?

Thx

@ls327782081
Copy link
Author

i set keepalive nil
s := udp.NewServer(udp.WithMux(mux), udp.WithTransmission(time.Duration(transmissionTimeout)time.Second, 2time.Duration(transmissionTimeout)*time.Second, transmissionMaxRetrans), udp.WithBlockwise(true, blockwise.SZX1024, time.Duration(transmissionTimeout)*time.Second), udp.WithContext(ctx))

@ls327782081
Copy link
Author

s := udp.NewServer(udp.WithMux(mux), udp.WithTransmission(time.Duration(transmissionTimeout)*time.Second, 2*time.Duration(transmissionTimeout)*time.Second, transmissionMaxRetrans), udp.WithBlockwise(true, blockwise.SZX1024, time.Duration(transmissionTimeout)*time.Second), udp.WithContext(ctx), udp.WithKeepAlive(nil))

@jkralik jkralik linked a pull request Jun 16, 2020 that will close this issue
@jkralik jkralik added the bug Something isn't working label Jun 16, 2020
@jkralik
Copy link
Member

jkralik commented Jun 16, 2020

I found the issue and I created fix for that in branch fixOfCloseSessions . Pls could you check if it is solve the issue ?

@ls327782081
Copy link
Author

this is been solved.😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants