From 625c565c0b6a3f8cec2fd229614743bbac81180a Mon Sep 17 00:00:00 2001 From: sago35 Date: Sat, 23 Jul 2022 13:58:12 +0900 Subject: [PATCH] rtl8720dn: improve error handling --- rtl8720dn/netdriver.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtl8720dn/netdriver.go b/rtl8720dn/netdriver.go index fb01982..15489ee 100644 --- a/rtl8720dn/netdriver.go +++ b/rtl8720dn/netdriver.go @@ -118,6 +118,9 @@ func (r *RTL8720DN) ConnectSSLSocket(addr, port string) error { if r.debug { fmt.Printf("ConnectSSLSocket(%q, %q)\r\n", addr, port) } + if r.root_ca == nil { + return fmt.Errorf("root_ca is not set") + } client, err := r.Rpc_wifi_ssl_client_create() if err != nil {