|
@@ -80,7 +80,10 @@ int hio_write_kcp(hio_t* io, const void* buf, size_t len) {
|
|
|
kcp_t* kcp = hio_get_kcp(io, conv);
|
|
kcp_t* kcp = hio_get_kcp(io, conv);
|
|
|
int nsend = ikcp_send(kcp->ikcp, (const char*)buf, len);
|
|
int nsend = ikcp_send(kcp->ikcp, (const char*)buf, len);
|
|
|
// printf("ikcp_send len=%d nsend=%d\n", (int)len, nsend);
|
|
// printf("ikcp_send len=%d nsend=%d\n", (int)len, nsend);
|
|
|
- if (nsend < 0) return nsend;
|
|
|
|
|
|
|
+ if (nsend < 0) {
|
|
|
|
|
+ hloge("ikcp_send error: %d", nsend);
|
|
|
|
|
+ return nsend;
|
|
|
|
|
+ }
|
|
|
ikcp_update(kcp->ikcp, (IUINT32)io->loop->cur_hrtime / 1000);
|
|
ikcp_update(kcp->ikcp, (IUINT32)io->loop->cur_hrtime / 1000);
|
|
|
return len;
|
|
return len;
|
|
|
}
|
|
}
|