stmcginnis / gofish

Gofish is a Golang client library for DMTF Redfish and SNIA Swordfish interaction.
BSD 3-Clause "New" or "Revised" License
211 stars 112 forks source link

fix insurance, check that the object is still active before disconnecting #299

Closed Muyk33rus closed 7 months ago

Muyk33rus commented 7 months ago

I caught a panic in a pet project on the state switch when I checked if the connection was available and if the. bmc's service was available

    panic: runtime error: invalid memory address or nil pointer dereference

[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x138a3ae]

goroutine 1 [running]: github.com/stmcginnis/gofish.(*APIClient).Logout(0x0?) /Users/max/Desktop/code/device-mgr/vendor/github.com/stmcginnis/gofish/client.go:576 +0xe panic({0x13e4040?, 0x1812cf0?})