update to unix socket shutdown sequence.

Should fix crashes occuring from unix mode shutdown/cleanup phase.