1 files changed, 3 insertions, 2 deletions
|
diff --git a/ot_udp.c b/ot_udp.c index 8e056db..02467e1 100644 --- a/ ot_udp.c+++ b/ ot_udp.c |
| @@ -81,9 +81,10 @@ int handle_udp6(int64_t serversocket, struct ot_workstruct *ws) { |
| 81 | uint16_t port, remoteport; |
81 | uint16_t port, remoteport; |
| 82 | size_t byte_count, scrape_count; |
82 | size_t byte_count, scrape_count; |
| 83 | |
83 | |
| 84 | byte_count = socket_recv6(serversocket, ws->inbuf, G_INBUF_SIZE, remoteip, &remoteport, &scopeid); |
84 | ssize_t result = socket_recv6(serversocket, ws->inbuf, G_INBUF_SIZE, remoteip, &remoteport, &scopeid); |
| 85 | if (!byte_count) |
85 | if (result <= 0) |
| 86 | return 0; |
86 | return 0; |
| |
87 | byte_count = (size_t)result; |
| 87 | |
88 | |
| 88 | stats_issue_event(EVENT_ACCEPT, FLAG_UDP, (uintptr_t)remoteip); |
89 | stats_issue_event(EVENT_ACCEPT, FLAG_UDP, (uintptr_t)remoteip); |
| 89 | stats_issue_event(EVENT_READ, FLAG_UDP, byte_count); |
90 | stats_issue_event(EVENT_READ, FLAG_UDP, byte_count); |
|