Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions eth-proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import sys
import socket
import signal

from stratum import settings
import stratum.logger
Expand Down Expand Up @@ -49,6 +50,12 @@ def ping(f):
except Exception:
pass

def restart(signum, frame):
python = sys.executable
os.execl(python, python, * sys.argv)

signal.signal(signal.SIGHUP, restart)

@defer.inlineCallbacks
def on_connect(f):
'''Callback when proxy get connected to the pool'''
Expand Down