liquidat / nagios-icinga-openvpn

Nagios/Icinga check for OpenVPN availability monitoring
MIT License
51 stars 27 forks source link

Removed connect() on the socket. #1

Closed Hagfjall closed 10 years ago

Hagfjall commented 10 years ago

According to https://docs.python.org/2/library/socket.html#socket.socket.sendto the sendto() should only be used when not connected. Removed connect since sendto() connect to the specified address.

This patch fixes the problem ( [Errno 56] Socket is already connected ) on OS X.

liquidat commented 10 years ago

Good catch, thanks for the pull-request =)