removed unused import
now we unregister the client before close the socket