Open yelodevopsi opened 2 years ago
We get Typeerror if cseqs is undefined, when testing from VLC-client.
https://github.com/medooze/rtsp-server/blob/4387853029583e874afae8f59431485feff8b07a/lib/RTSPConnection.js#L54-L62
Add a cseqs && on :55 ... etc to handle this.
Edit: Occurs when VLC-client is missing cseq in header.
Should be able to handle gracefully and not with Typeerror.
log:
[...] pms | 2022-01-19T09:22:29.953Zrtsp:debug REQUEST: pms | 2022-01-19T09:22:29.953Zrtsp:debug SETUP rtsp://pms-server:8554/PI-05/trackID=1 RTSP/1.0 pms | CSeq: 4 pms | User-Agent: LibVLC/3.0.11 (LIVE555 Streaming Media v2016.11.28) pms | Transport: RTP/AVP/TCP;unicast;interleaved=0-1 pms | pms | pms | 2022-01-19T09:22:29.953Zrtsp:debug RESPONSE: pms | 2022-01-19T09:22:29.953Zrtsp:debug RTSP/1.0 404 Camera not found pms | CSeq: 4 pms | User-Agent: medooze-rtsp-server pms | pms | pms | 2022-01-19T09:22:29.962Z [DEBUG] MediaServer rtsp connection disconnected pms | 2022-01-19T09:22:29.977Z [DEBUG] MediaServer Got new rtsp connection pms | 2022-01-19T09:22:29.981Zrtsp:debug REQUEST: pms | 2022-01-19T09:22:29.981Zrtsp:debug SETUP rtsp://pms-server:8554/pi-05 RTSP/1.0 pms | CSeq: 0 pms | Transport: RTP/AVP;unicast;client_port=9308-9309 pms | pms | pms | 2022-01-19T09:22:29.981Zrtsp:debug RESPONSE: pms | 2022-01-19T09:22:29.981Zrtsp:debug RTSP/1.0 404 Camera not found pms | CSeq: 0 pms | User-Agent: medooze-rtsp-server pms | pms | pms | 2022-01-19T09:22:29.989Z [DEBUG] MediaServer rtsp connection disconnected pms | 2022-01-19T09:22:30.006Z [DEBUG] MediaServer Got new rtsp connection pms | 2022-01-19T09:22:30.006Zrtsp:debug REQUEST: pms | 2022-01-19T09:22:30.006Zrtsp:debug OPTIONS rtsp://pms-server:8554 RTSP/1.0 pms | pms | 2022-01-19T09:22:30.006Zrtsp:error TypeError: Cannot read properties of undefined (reading 'values') pms | 2022-01-19T09:22:30.006Zrtsp:error at Socket.<anonymous> (/usr/src/app/node_modules/medooze-rtsp-server/lib/RTSPConnection.js:58:25) pms | 2022-01-19T09:22:30.006Zrtsp:error at Socket.emit (node:events:390:28) pms | 2022-01-19T09:22:30.006Zrtsp:error at addChunk (node:internal/streams/readable:315:12) pms | 2022-01-19T09:22:30.006Zrtsp:error at readableAddChunk (node:internal/streams/readable:289:9) pms | 2022-01-19T09:22:30.006Zrtsp:error at Socket.Readable.push (node:internal/streams/readable:228:10) pms | 2022-01-19T09:22:30.006Zrtsp:error at TCP.onStreamRead (node:internal/stream_base_commons:199:23) pms | 2022-01-19T09:22:30.013Zrtsp:error No request or hader
@murillo128 : Would it be possible to reject request or transport.response() etc if cseq is missing?
Currently this goes to timeout on the client, but we'd like to reply with terminate if possible.
We get Typeerror if cseqs is undefined, when testing from VLC-client.
https://github.com/medooze/rtsp-server/blob/4387853029583e874afae8f59431485feff8b07a/lib/RTSPConnection.js#L54-L62
Add a cseqs && on :55 ... etc to handle this.
Edit: Occurs when VLC-client is missing cseq in header.
Should be able to handle gracefully and not with Typeerror.
log: