Manually calling disconnect does call the callback (and in this case, also reconnect)
disconnect
Connected to Wifi. IP address is: 192.168.43.151 connected! >wifi.getStatus() ={ station: "connected", ssid: "Mi A3", bssid: "2e:1d:1f:e3:55:21", channel: 8, rssi: -18, htMode: "HT20", authMode: "wpa2", mode: "APSTA", powersave: "modem" } >http.get("http://www.pur3.co.uk/hello.txt"); =httpCRq: { type: 1, res: httpCRs: { }, opt: { protocol: "http:", method: "GET", host: "http://www.pur3.co.uk", path: "/hello.txt", pathname: "/hello.txt", search: null, port: null, query: null }, dSnd: "GET /hello.txt HT" ... "ww.pur3.co.uk\r\n\r\n", sckt: 59, cls: true } >wifi.disconnect() =undefined disconnected! WARNING: Wifi:startMDNS - espressif WARNING: Wifi:stopMDNS Connected to Wifi. IP address is: 192.168.43.151 connected!
@parasquid started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Manually calling
disconnect
does call the callback (and in this case, also reconnect)