diff --git a/src/shared/drivers/WIZ5500/WIZ5500.cpp b/src/shared/drivers/WIZ5500/WIZ5500.cpp
index bf272bb5fa8aebafb60e51afb78bce16814fe9f4..b9cc3f0537ba6d9847735c0f6cca14a72697dae5 100644
--- a/src/shared/drivers/WIZ5500/WIZ5500.cpp
+++ b/src/shared/drivers/WIZ5500/WIZ5500.cpp
@@ -487,7 +487,8 @@ int Wiz5500::waitForSocketIrq(miosix::Lock<miosix::FastMutex>& l, int sock_n,
 
     while (interrupt_service_thread == this_thread)
     {
-        if (Kernel::getOldTick() > start + timeout)
+        // In case of no timeout or expired timeout
+        if (timeout != -1 && Kernel::getOldTick() > start + timeout)
             break;
 
         // Run a single step of the ISR