Skip to content

Commit 625c565

Browse files
sago35deadprogram
authored andcommitted
rtl8720dn: improve error handling
1 parent b64d4ec commit 625c565

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rtl8720dn/netdriver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ func (r *RTL8720DN) ConnectSSLSocket(addr, port string) error {
118118
if r.debug {
119119
fmt.Printf("ConnectSSLSocket(%q, %q)\r\n", addr, port)
120120
}
121+
if r.root_ca == nil {
122+
return fmt.Errorf("root_ca is not set")
123+
}
121124

122125
client, err := r.Rpc_wifi_ssl_client_create()
123126
if err != nil {

0 commit comments

Comments
 (0)