I had an issue that when KDB went into debug trap mode it would allow establishing a TCP connection, but would not reply to handshake requests, causing the client to hang.
This new function allows to use a context specific timeout which forces a return even if the actual request hangs.
It will also close the connection, which should cause the handshake to fail so there will be no hanging go routine.
I thought about updating DialKDBTimeout with a similar functionality, but held off in case the existing behaviour was intentional. I can make the change if needed.
I had an issue that when KDB went into debug trap mode it would allow establishing a TCP connection, but would not reply to handshake requests, causing the client to hang.
This new function allows to use a context specific timeout which forces a return even if the actual request hangs.
It will also close the connection, which should cause the handshake to fail so there will be no hanging go routine.
I thought about updating DialKDBTimeout with a similar functionality, but held off in case the existing behaviour was intentional. I can make the change if needed.