소스 검색

destroy all the things

Girish Ramakrishnan 7 년 전
부모
커밋
736cf930e9
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      test/test.js

+ 2 - 1
test/test.js

@@ -177,9 +177,10 @@ describe('Application life cycle test', function () {
             done(new Error('Connected'));
         });
 
-        client.on('timeout', function () { done(); }); // the packet just got dropped (good)
+        client.on('timeout', function () { client.destroy(); done(); }); // the packet just got dropped (good)
 
         client.on('error', function (error) {
+            client.destroy();
             done(new Error('Should have got timeout but got error:' + error.message));
         });
     });