fixes #17: we set this 0 since not using their_addr output by accept call,

but SRT v1.4.2 is checking for this size to be large enough to write into it
the actual address in the first place. anyhow, wether we read it or not,
it doesn't matter, the allocated size of sockaddr_in is always the same
(per any platform).
This commit is contained in:
Stephan Hesse 2021-03-23 12:26:58 +01:00
parent f03db7b8a7
commit 11e53cfc81

View file

@ -168,7 +168,7 @@ Napi::Value NodeSRT::Accept(const Napi::CallbackInfo& info) {
Napi::Number socketValue = info[0].As<Napi::Number>();
sockaddr_in their_addr;
int addr_size;
int addr_size = sizeof (sockaddr_in);
int their_fd = srt_accept(socketValue, (struct sockaddr *)&their_addr, &addr_size);
if (their_fd == SRT_INVALID_SOCK) {