Skip to content

Commit 571f6af

Browse files
fix: evict stale pooled connection before each control-channel dial (#60)
Co-authored-by: Claude Fable 5 <[email protected]>
1 parent 0da37a6 commit 571f6af

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

meshcore/agentcore.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4807,6 +4807,9 @@ void MeshServer_ConnectEx(MeshAgentHostContainer *agent)
48074807

48084808
ILibWebClient_AddWebSocketRequestHeaders(req, 65535, MeshServer_OnSendOK);
48094809

4810+
// Evict any stale pooled connection to this address so every dial performs a fresh TCP+TLS connect instead of riding a dead kept-alive socket.
4811+
ILibWebClient_DeleteRequests(agent->httpClientManager, (struct sockaddr*)&meshServer);
4812+
48104813
void **tmp = ILibMemory_SmartAllocate(2 * sizeof(void*));
48114814
agent->controlChannelRequest = tmp;
48124815
tmp[0] = agent;

0 commit comments

Comments
 (0)