Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 3 additions & 4 deletions ixwebsocket/IXSelectInterruptPipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ namespace ix
return ret == 8;
}

// TODO: return max uint64_t for errors ?
uint64_t SelectInterruptPipe::read()
{
std::lock_guard<std::mutex> lock(_fildesMutex);
Expand All @@ -140,11 +139,11 @@ namespace ix

uint64_t value = 0;

ssize_t ret = -1;
ssize_t readret = -1;
do
{
ret = ::read(fd, &value, sizeof(value));
} while (ret == -1 && errno == EINTR);
readret = ::read(fd, &value, sizeof(value));
} while (readret == -1 && errno == EINTR);

return value;
}
Expand Down
4 changes: 1 addition & 3 deletions ixwebsocket/IXSocketConnect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <linux/in.h>
#include <linux/tcp.h>
#endif
#include <ixwebsocket/IXSelectInterruptFactory.h>

namespace ix
{
Expand Down Expand Up @@ -67,8 +66,7 @@ namespace ix

int timeoutMs = 10;
bool readyToRead = false;
SelectInterruptPtr selectInterrupt = ix::createSelectInterrupt();
PollResultType pollResult = Socket::poll(readyToRead, timeoutMs, fd, selectInterrupt);
PollResultType pollResult = Socket::poll(readyToRead, timeoutMs, fd, nullptr);

if (pollResult == PollResultType::Timeout)
{
Expand Down
Loading