Lab2_web / Mbed 2 deprecated webserverBlinky

Dependencies:   mbed

Fork of webserverBlinky by RealTimeCompLab2

Revision:
116:1272e9f7ad70
Parent:
115:b8ddff0e782f
Child:
117:c819ae068336
--- a/main.cpp	Sun Aug 06 10:42:20 2017 +0000
+++ b/main.cpp	Sun Aug 06 17:39:22 2017 +0000
@@ -705,13 +705,12 @@
                 dataLen = tcpResponse(tcpDataOut,tcpDataSize); // not a web request, send a packet reporting number of received bytes
             }
             break;
+        case TCP_FLAG_FIN:
+        case TCP_FLAG_FIN | TCP_FLAG_ACK:
         case TCP_FLAG_FIN | TCP_FLAG_PSH | TCP_FLAG_ACK:
-        case TCP_FLAG_FIN | TCP_FLAG_ACK:
+            flagsOut = TCP_FLAG_ACK | TCP_FLAG_FIN; // set the FIN flag to start closing the connection
             ack_out++; // for FIN flag we always have to increase sequence by 1
             break;
-        case TCP_FLAG_FIN:
-            flagsOut = TCP_FLAG_ACK | TCP_FLAG_FIN; // set the FIN flag to start closing the connection
-            break;
         default:
             return; // ignore remaining packets
     } // switch