mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-07 05:22:27 +00:00
Fix a nil pointer dereference
error that occurs in tcpReader
's Read
method (#1090)
* Fix a `nil pointer dereference` error that occurs in `tcpReader`'s `Read` method
* #run_acceptance_tests
* #run_acceptance_tests
* Revert "Fix a `nil pointer dereference` error that occurs in `tcpReader`'s `Read` method"
This reverts commit ccef6cb393
.
* Fix the race condition using locks #run_acceptance_tests
This commit is contained in:
@@ -72,8 +72,10 @@ func (t *tcpStream) SetProtocol(protocol *api.Protocol) {
|
||||
t.protocol = protocol
|
||||
|
||||
// Clean the buffers
|
||||
t.Lock()
|
||||
t.client.msgBufferMaster = make([]api.TcpReaderDataMsg, 0)
|
||||
t.server.msgBufferMaster = make([]api.TcpReaderDataMsg, 0)
|
||||
t.Unlock()
|
||||
}
|
||||
|
||||
func (t *tcpStream) GetOrigin() api.Capture {
|
||||
|
Reference in New Issue
Block a user