diff --git a/limelight-common/AudioStream.c b/limelight-common/AudioStream.c index 6a61c78..3dedd1f 100644 --- a/limelight-common/AudioStream.c +++ b/limelight-common/AudioStream.c @@ -195,6 +195,9 @@ int startAudioStream(void) { callbacks.init(); rtpSocket = bindUdpSocket(RTP_PORT); + if (rtpSocket == INVALID_SOCKET) { + return LastSocketError(); + } err = PltCreateThread(UdpPingThreadProc, NULL, &udpPingThread); if (err != 0) { diff --git a/limelight-common/VideoStream.c b/limelight-common/VideoStream.c index 788ebda..e414a8f 100644 --- a/limelight-common/VideoStream.c +++ b/limelight-common/VideoStream.c @@ -163,6 +163,9 @@ int startVideoStream(void* rendererContext, int drFlags) { configuration.height, 60, rendererContext, drFlags); rtpSocket = bindUdpSocket(RTP_PORT); + if (rtpSocket == INVALID_SOCKET) { + return LastSocketError(); + } err = PltCreateThread(UdpPingThreadProc, NULL, &udpPingThread); if (err != 0) {