diff --git a/src/uvw/udp.hpp b/src/uvw/udp.hpp index 0ce7762f..f18ee222 100644 --- a/src/uvw/udp.hpp +++ b/src/uvw/udp.hpp @@ -100,7 +100,7 @@ private: class UDPHandle final: public Handle { template static void recvCallback(uv_udp_t *handle, ssize_t nread, const uv_buf_t *buf, const sockaddr *addr, unsigned flags) { - typename details::IpTraits::Type *aptr = reinterpret_cast::Type *>(addr); + const typename details::IpTraits::Type *aptr = reinterpret_cast::Type *>(addr); UDPHandle &udp = *(static_cast(handle->data)); // data will be destroyed no matter of what the value of nread is