Browse Source

fix debug log showing in release

master
peter 4 years ago
parent
commit
1627c12f9d
3 changed files with 1 additions and 25 deletions
  1. 1
    1
      package.json
  2. 0
    5
      src/PromiseIO/Server.ts
  3. 0
    19
      test/Test.ts

+ 1
- 1
package.json View File

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

+ 0
- 5
src/PromiseIO/Server.ts View File

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

+ 0
- 19
test/Test.ts View File

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
      * ## 1.11.0 breaking ##
874
      * ## 1.11.0 breaking ##
894
      * 
875
      * 

Loading…
Cancel
Save