Skip to content

Remove "connect poll fix" #5

@thatbudakguy

Description

@thatbudakguy

Unclear exactly why this was added, but it seems to always take effect in unix micropython. Can we live without it?

amqc/amqc/client.py

Lines 274 to 294 in 024de05

def _connect_poll_fix(self):
import select
poller = select.poll()
poller.register(self._sock, select.POLLIN | select.POLLOUT)
try:
self._sock.connect(self._addr)
except OSError as e:
if e.errno != EINPROGRESS:
raise e
self._logger.debug("- poll_fix: polling sock for connect open")
res = poller.poll(self._sock_connect_timeout)
# self._logger.info("c2u", res)
poller.unregister(self._sock)
# self._logger.info("c2ud", res)
if not res:
# self._logger.info("c2e", res)
self._sock.close()
raise OSError("Socket Connect Timeout")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions