Host library for controlling a WiConnect enabled Wi-Fi module.

Dependents:   wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more

Revision:
40:4b4306f3d829
Parent:
29:b6af04b77a56
Child:
41:66beaca0fd1a
--- a/WiconnectSocket.cpp	Mon Feb 23 20:30:18 2015 -0800
+++ b/WiconnectSocket.cpp	Mon Feb 23 22:21:50 2015 -0800
@@ -97,7 +97,12 @@
 
 /*************************************************************************************************/
 WiconnectResult WiconnectSocket::init(uint8_t handle_, SocketType type_, const char *host_, uint16_t remotePort_, uint16_t localPort_)
-{
+{
+    do
+    {
+        result = close();
+    } while(result == WICONNECT_PROCESSING);
+    
     handle = handle_;
     type = type_;
     remotePort = remotePort_;