[FIX] Detect when interface goes down

Sockets are not immediatly closed when interfaces disappears, this commit takes
care of that.