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

when setting MaxConnsPerIP to value greater than zero, the TLSConnectionState( ) is null on a TLS connection returned from the worker pool. #1770

Closed
rabarar opened this issue Apr 28, 2024 · 11 comments

Comments

@rabarar
Copy link

rabarar commented Apr 28, 2024

Using GoFiber (which uses fasthttp) if i attempt to set the server's MaxConnsPerIP, then the *fasthttp.RequestCtx.TLSConnectionState( ) returns nil. Without setting it to a value greater than zero, it works as expected and the TLSConnectionState( ) returned is non-nil

@erikdubbelboer
Copy link
Collaborator

I have pushed a fix. I'll tag a release next week probably.

@rabarar
Copy link
Author

rabarar commented Apr 29, 2024 via email

@rabarar
Copy link
Author

rabarar commented May 3, 2024 via email

@erikdubbelboer
Copy link
Collaborator

I can't check right now but have you tried casting like this?

var conn *fasthttp.hijackConn
tlsConn, ok := conn.Conn.(*tls.Conn)

@rabarar
Copy link
Author

rabarar commented May 3, 2024 via email

@erikdubbelboer
Copy link
Collaborator

Maybe this?

kws.Conn.NetConn().(interface{ UnsafeConn() net.Conn }).UnsafeConn()

@rabarar
Copy link
Author

rabarar commented May 3, 2024 via email

@rabarar
Copy link
Author

rabarar commented May 3, 2024 via email

@rabarar
Copy link
Author

rabarar commented May 3, 2024 via email

@rabarar
Copy link
Author

rabarar commented May 3, 2024 via email

@rabarar
Copy link
Author

rabarar commented May 13, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants