[socket] Log error when UDP socket requested on LWIP TCP-only platforms (#14089)

This commit is contained in:
J. Nick Koston
2026-02-19 08:39:44 -06:00
committed by GitHub
parent 4cc1e6a910
commit 7b53a98950
@@ -680,6 +680,11 @@ class LWIPRawListenImpl final : public LWIPRawImpl {
};
std::unique_ptr<Socket> socket(int domain, int type, int protocol) {
if (type != SOCK_STREAM) {
ESP_LOGE(TAG, "UDP sockets not supported on this platform, use WiFiUDP");
errno = EPROTOTYPE;
return nullptr;
}
auto *pcb = tcp_new();
if (pcb == nullptr)
return nullptr;