Skip to content

setNoDelay on ESP32 causing error [E][WiFiClient.cpp:309] setOption(): fail on fd -1, errno: 9, "Bad file number" #637

Closed
@sivar2311

Description

@sivar2311

Hi Markus,

on ESP32 it seems that setNoDelay(true) does not work and causing the "Bad file number" error when WebSocketsClient connects to a server.

setNoDelay(true) is called in connectedCb in WebSocketsClient.cpp:

#if(WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266) || (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP32)
_client.tcp->setNoDelay(true);

I tried to follow the path to see where the error comes from, but I ended up in lwip_setsockopt_r in lwip.h

At this point my knowledge left me :(

I think the ESP32 should be removed from from the #if macro - what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions