Browse Source

fix: websocket uses network object

283
ThomasV 9 years ago
parent
commit
1207ad3ba4
  1. 2
      electrum
  2. 2
      lib/websockets.py

2
electrum

@ -476,7 +476,7 @@ if __name__ == '__main__':
server = NetworkServer(config, network) server = NetworkServer(config, network)
if config.get('websocket_server'): if config.get('websocket_server'):
from electrum import websockets from electrum import websockets
websockets.WebSocketServer(config, server).start() websockets.WebSocketServer(config, network).start()
if config.get('requests_dir'): if config.get('requests_dir'):
util.check_www_dir(config.get('requests_dir')) util.check_www_dir(config.get('requests_dir'))
server.start() server.start()

2
lib/websockets.py

@ -32,7 +32,7 @@ class ElectrumWebSocket(WebSocket):
def handleMessage(self): def handleMessage(self):
assert self.data[0:3] == 'id:' assert self.data[0:3] == 'id:'
print "message received", self.data util.print_error("message received", self.data)
request_id = self.data[3:] request_id = self.data[3:]
request_queue.put((self, request_id)) request_queue.put((self, request_id))

Loading…
Cancel
Save