mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-28 01:26:44 +00:00
1c675c5f24
The plugin was written against the http.client based SecureHTTPConnection, and when that went away the reference was pointed at the aiohttp WebConnection, which shares the name and nothing else. Nothing in it could run: the transport called an async request() without awaiting it and then reached for a getresponse() the new class does not have, and three PDUClient methods that were never coroutines were awaited by the entry points. Two transports now, both local to this plugin. https is aiohttp and stays on the event loop, since the cert verifier records new fingerprints through tasks.spawn. http is http.client in a thread, with its own socket so it can still ask for a smaller segment size before connect: aiohttp only takes a socket factory from 3.12 on, newer than el9, el10, ubuntu 24.04 or Leap 16 ship. That side has no cert to verify and its credentials arrive already read, so the thread touches nothing. connect() establishes and authenticates, wc is just the accessor now, and logout() no longer sends a session id it never obtained. update() reports an unsupported element instead of raising NameError. On the https side cookies follow aiohttp's domain rules and the one POST with a body goes out as text/plain, where http.client replayed every cookie and sent no content type. The http side is as before, and neither can be settled without an Eaton PDU on the bench. Both transports were exercised against a stand-in: login, outlet read and set, sensors, logout, and a clamped segment size on the plaintext path.