this can apprently be nil
@@ -1063,9 +1063,11 @@ func (b *OGame) logout() {
case <-b.closeChatCh:
default:
close(b.closeChatCh)
+ if b.ws != nil {
b.ws.Close()
}
}
+}
func isLogged(pageHTML []byte) bool {
doc, err := goquery.NewDocumentFromReader(bytes.NewReader(pageHTML))
