Add test for server stopping during connection