GSSocketOutputStream: shuts down the socket before closing it