Properly closing sockets, server unittest passing