func (h *fshandler) CloseSession(sessionID [16]byte) error {
	h.mu.Lock()
	sess, ok := h.sessions[sessionID]
	if !ok {
		// That means that no files were opened in that session and we have nothing to clear.
		h.mu.Unlock()
		return nil
	}
	delete(h.sessions, sessionID)
	h.mu.Unlock()
	sess.mu.Lock()
	defer sess.mu.Unlock()

	var err error
	for _, f := range sess.handles {
		if cerr := f.Close(); cerr != nil && err == nil {
			err = cerr
		}
	}
	return err
}
// CloseSession implements server.Handler.CloseSession.
CloseSession implements server.Handler.CloseSession.
// CloseSession implements server . Handler . CloseSession .
func (h *fshandler) CloseSession(sessionID [16]byte) error {
	h.mu.Lock()
	sess, ok := h.sessions[sessionID]
	if !ok {
		h.mu.Unlock()
		return nil
	}
	delete(h.sessions, sessionID)
	h.mu.Unlock()
	sess.mu.Lock()
	defer sess.mu.Unlock()
	var err error
	for _, f := range sess.handles {
		if cerr := f.Close(); cerr != nil && err == nil {
			err = cerr
		}
	}
	return err
}
func ( h * fshandler ) CloseSession ( sessionID [ 16 ] byte ) error { h . mu . Lock ( ) sess , ok := h . sessions [ sessionID ] if ! ok { h . mu . Unlock ( ) return nil } delete ( h . sessions , sessionID ) h . mu . Unlock ( ) sess . mu . Lock ( ) defer sess . mu . Unlock ( ) var err error for _ , f := range sess . handles { if cerr := f . Close ( ) ; cerr != nil && err == nil { err = cerr } } return err }
CloseSession implements server.Handler.CloseSession.
CloseSession implements server . Handler . CloseSession .
// That means that no files were opened in that session and we have nothing to clear.