Guard against session close from session thread

Fixes CPP-161
Line up the commas with the colon ;) (same as in other files)