lib60870
lib60870 copied to clipboard
- Linux socket: Fix uninitialized variable use in Socket_connect() (#57)
getsockopt() may return -1, set ERRNO = EINPROGRESS (115: Operation now in progress) and not initialze so_error on Kubuntu 19.10 AMD64 with kernel 5.3.0-23-generic
So, initialize the value to -1, and add check for getsockopt() result (and add log message if DEBUG_SOCKET is set).
Fixes https://github.com/mz-automation/lib60870/issues/57