Fix error message mismatch
parent
059566498b
commit
200bd35bb2
4
stomp.c
4
stomp.c
|
@ -368,7 +368,7 @@ static int _stomp_recv(stomp_t *stomp, char *msg, const size_t length)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (len == 0) {
|
if (len == -1) {
|
||||||
#if HAVE_STOMP_SSL
|
#if HAVE_STOMP_SSL
|
||||||
if (stomp->options.use_ssl) {
|
if (stomp->options.use_ssl) {
|
||||||
stomp_set_error(stomp, "Error reading from socket", errno, "%s. (SSL in use)", strerror(errno));
|
stomp_set_error(stomp, "Error reading from socket", errno, "%s. (SSL in use)", strerror(errno));
|
||||||
|
@ -379,7 +379,7 @@ static int _stomp_recv(stomp_t *stomp, char *msg, const size_t length)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
stomp->status = -1;
|
stomp->status = -1;
|
||||||
} else if (len == -1) {
|
} else if (len == 0) {
|
||||||
stomp_set_error(stomp, "Sender closed connection unexpectedly", 0, NULL);
|
stomp_set_error(stomp, "Sender closed connection unexpectedly", 0, NULL);
|
||||||
stomp->status = -1;
|
stomp->status = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue