Fix a nil pointer dereference error that occurs in tcpReader's Read method

This commit is contained in:
M. Mert Yildiran 2022-05-17 09:31:36 +03:00
parent bfa834e840
commit ccef6cb393
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A

View File

@ -121,7 +121,7 @@ func (reader *tcpReader) Read(p []byte) (int, error) {
if !reader.isProtocolIdentified() {
reader.msgBufferMaster = append(
reader.msgBufferMaster,
msg,
NewTcpReaderDataMsg(msg.GetBytes(), msg.GetTimestamp()),
)
}
}