Closed SteveSelva closed 1 year ago
This sounds very strange, especially since neither HTTPConnector nor your replacement appear in the stack trace that I can see. getPeerAddress just copies the address from the underlying HTTPSession.
Can you explain why you need to write your own connector (eg: what is missing in the existing class)?
Yeah, its kind of weird. It was working well and all of sudden this exception is thrown when I restart the PC.
And I don't know how peerAddr_
becomes NULL
which was copied during the construction of proxygen::HTTPSession
.
Is there any way that peerAddr_
can become NULL
?
I am implementing my own connector to handle CONNECT requests. (HTTPS proxy).
Is there any way that peerAddr_ can become NULL?
I don't think so? It's not even a pointer, folly::SocketAddress is a member of the session.
This is the exception being thrown and the local data at that time.
I don't know what's happening. Can you help me fix this please.
Now, I removed the connector and it worked fine. After that, I extended proxygen::SessionPool
and made my own implementation of fetching Sessions from session lists. This again caused the same error. Don't know what is causing this issue, do you know why?
I am trying to implement my own
HTTPConnector
for creating connections in Upstream. But when I use my connector in place ofproxygen::HTTPConnector
inProxyService::ProxyHandler
, it throws me MemoryAccessViolation exception. I even tried copying the HTTPConnector.h file and HTTPConnector.cpp file as it is and just changed the name of the class and file. Still that didn't work. And also I can't include that file in my project, it throws the exception. I have to exclude those files from my project and add backproxygen::HTTPConnector
for it to work normally.HTTPServerAcceptor.cpp
When I check the function,
txn.getPeerAddress()
, the Peer Address wasNULL
causing MemoryAccessViolation. But I don't know how changing theHTTPConnector
affects here.Call Stacktrace
Image of the Memory Access Violation Exception thrown. Exception.png
What causes the error and how to fix it and implement my own connector? Please help me with this issue.