You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2023/05/10 13:57:34 UTC

[plc4x] branch develop updated: fix(plc4go/spi): fix issue with pcap close

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new f4db5fbf4d fix(plc4go/spi): fix issue with pcap close
f4db5fbf4d is described below

commit f4db5fbf4de5dcd47e5e1d63956dfb70dd5d491b
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed May 10 15:57:27 2023 +0200

    fix(plc4go/spi): fix issue with pcap close
---
 plc4go/spi/transports/pcap/Transport.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plc4go/spi/transports/pcap/Transport.go b/plc4go/spi/transports/pcap/Transport.go
index e1943e8a41..96e166aede 100644
--- a/plc4go/spi/transports/pcap/Transport.go
+++ b/plc4go/spi/transports/pcap/Transport.go
@@ -184,7 +184,9 @@ func (m *TransportInstance) Connect() error {
 }
 
 func (m *TransportInstance) Close() error {
-	m.handle.Close()
+	if handle := m.handle; handle != nil {
+		m.handle.Close()
+	}
 	m.connected = false
 	return nil
 }