stratum: dont try to send on closed sockets

This commit is contained in:
Tanguy Pruvot 2016-07-07 14:37:13 +02:00
parent d99bc61b5c
commit d2f0f424ee

View file

@ -157,6 +157,11 @@ int socket_send(YAAMP_SOCKET *s, const char *format, ...)
vsprintf(buffer, format, args);
va_end(args);
if(!s) {
errno = EINVAL;
return -1;
}
// json_value *json = json_parse(buffer, strlen(buffer));
// if(!json)
// debuglog("sending bad json message: %s\n", buffer);