fix bug: mutex lock not removed when connection closed