Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Update AsyncWebSocket.cpp #1142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AsyncWebSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ void AsyncWebSocketClient::binary(AsyncWebSocketMessageBuffer * buffer)

IPAddress AsyncWebSocketClient::remoteIP() {
if(!_client) {
return IPAddress(0U);
return IPAddress((uint32_t)0);
Copy link

@willsmart willsmart Jun 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great to get this merged some day. There seems to be a whole history of people forking the lib to fix this one line!
I'm using current libs and modern platformio with a ESP32 chip and this error is a hard blocker for using this library (from original source) at all.

The overload with no arguments defaults to a zero address, so I'd suggest leaving the address out altogether...

Suggested change
return IPAddress((uint32_t)0);
return IPAddress();

Both work though, so 🤷

}
return _client->remoteIP();
}
Expand Down