implement graceful shutdown in sslocal; close #179