Quellcode durchsuchen

fix debug log showing in release

master
peter vor 4 Jahren
Ursprung
Commit
1627c12f9d
3 geänderte Dateien mit 1 neuen und 25 gelöschten Zeilen
  1. 1
    1
      package.json
  2. 0
    5
      src/PromiseIO/Server.ts
  3. 0
    19
      test/Test.ts

+ 1
- 1
package.json Datei anzeigen

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "rpclibrary",
3
-  "version": "2.3.0",
3
+  "version": "2.3.1",
4 4
   "description": "rpclibrary is a websocket RPC library",
5 5
   "main": "./js/Index.js",
6 6
   "repository": {

+ 0
- 5
src/PromiseIO/Server.ts Datei anzeigen

@@ -18,12 +18,7 @@ export class PromiseIO {
18 18
         this.io = socketio(httpServer, { cookie:false })
19 19
 
20 20
         this.io!.on('connection', (clientSocket: Socket) => {
21
-            console.log(this.listeners);
22
-
23 21
             clientSocket.use((packet, next) => {
24
-                console.log(this.listeners[packet[0]]);
25
-                
26
-                console.log(packet[0]);
27 22
                 next()
28 23
             })
29 24
     

+ 0
- 19
test/Test.ts Datei anzeigen

@@ -870,25 +870,6 @@ describe("attaching handlers before connecting", () => {
870 870
         })
871 871
     })
872 872
 
873
-    it("fires error if call is unknown", (done) => {
874
-        const serv = new RPCServer().listen(21004)
875
-        const sock = new RPCSocket(21004, 'localhost')
876
-
877
-        sock.on('error', (err) => {
878
-            sock.close()
879
-            serv.close()
880
-            done()
881
-        })
882
-
883
-        sock.connect().then(_ => {
884
-            sock.call("unknownRPC123", "AAAAA").catch(e => {  }).then(x => {
885
-                done(new Error("unexpected return value"))
886
-            })
887
-        }).catch(e => {
888
-            done(e)
889
-        })
890
-    })
891
-
892 873
     /*
893 874
      * ## 1.11.0 breaking ##
894 875
      * 

Laden…
Abbrechen
Speichern