Fixes #95 - Close sockets on offline event