mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-14 11:19:21 +02:00
fix Makefile.am
This commit is contained in:
parent
1375732c80
commit
b4cb5e23c0
@ -39,10 +39,12 @@ msgpack/zone.hpp: msgpack/zone.hpp.erb
|
|||||||
|
|
||||||
MOSTLYCLEANFILES = \
|
MOSTLYCLEANFILES = \
|
||||||
msgpack/type/tuple.hpp \
|
msgpack/type/tuple.hpp \
|
||||||
|
msgpack/type/define.hpp \
|
||||||
msgpack/zone.hpp
|
msgpack/zone.hpp
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
msgpack/type/tuple.hpp.erb \
|
msgpack/type/tuple.hpp.erb \
|
||||||
|
msgpack/type/define.hpp.erb \
|
||||||
msgpack/zone.hpp.erb
|
msgpack/zone.hpp.erb
|
||||||
|
|
||||||
libmsgpack_la_LIBADD = -L../c -lmsgpackc
|
libmsgpack_la_LIBADD = -L../c -lmsgpackc
|
||||||
|
@ -22,14 +22,14 @@ public:
|
|||||||
ssize_t count =
|
ssize_t count =
|
||||||
read(m_sock, m_pac.buffer(), m_pac.buffer_capacity());
|
read(m_sock, m_pac.buffer(), m_pac.buffer_capacity());
|
||||||
|
|
||||||
if(count < 0) {
|
if(count <= 0) {
|
||||||
|
if(count == 0) {
|
||||||
|
throw std::runtime_error("connection closed");
|
||||||
|
}
|
||||||
if(errno == EAGAIN || errno == EINTR) {
|
if(errno == EAGAIN || errno == EINTR) {
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
throw std::runtime_error(strerror(errno));
|
|
||||||
}
|
}
|
||||||
} else if(count == 0) {
|
throw std::runtime_error(strerror(errno));
|
||||||
throw std::runtime_error("connection closed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pac.buffer_consumed(count);
|
m_pac.buffer_consumed(count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user