Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: use UV_EINVAL instead of EINVAL in udp_wrap
Currently if the buffer size exceeds the maximum int size the following error will be thrown: dgram.js:180 throw new errors.Error('ERR_SOCKET_BUFFER_SIZE', e); ^ Error [ERR_SOCKET_BUFFER_SIZE]: Could not get or set buffer size: Error: Unknown system error 22: Unknown system error 22, uv_recv_buffer_size at bufferSize (dgram.js:180:11) It looks like perhaps UV_EINVAL was intended to give the following error message instead: dgram.js:180 throw new errors.Error('ERR_SOCKET_BUFFER_SIZE', e); ^ Error [ERR_SOCKET_BUFFER_SIZE]: Could not get or set buffer size: Error: EINVAL: invalid argument, uv_recv_buffer_size at bufferSize (dgram.js:180:11) This commit changes EINVAL to use UV_EINVAL. PR-URL: #15444 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information