Skip to content

Commit fe34377

Browse files
authored
Update op-node-entrypoint (#546)
1 parent b095dbd commit fe34377

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

op-node-entrypoint

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ get_public_ip() {
1212
# Iterate through the providers until an IP is found or the list is exhausted
1313
for provider in "${PROVIDERS[@]}"; do
1414
local IP
15-
IP=$(curl -s "$provider")
15+
IP=$(curl -s --max-time 10 --connect-timeout 5 "$provider")
1616
# Check if IP contains a valid format (simple regex for an IPv4 address)
1717
if [[ $IP =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
1818
echo "$IP"
@@ -28,7 +28,7 @@ if [[ -z "$OP_NODE_NETWORK" && -z "$OP_NODE_ROLLUP_CONFIG" ]]; then
2828
fi
2929

3030
# wait until local execution client comes up (authed so will return 401 without token)
31-
until [ "$(curl -s -w '%{http_code}' -o /dev/null "${OP_NODE_L2_ENGINE_RPC/ws/http}")" -eq 401 ]; do
31+
until [ "$(curl -s --max-time 10 --connect-timeout 5 -w '%{http_code}' -o /dev/null "${OP_NODE_L2_ENGINE_RPC/ws/http}")" -eq 401 ]; do
3232
echo "waiting for execution client to be ready"
3333
sleep 5
3434
done
@@ -44,4 +44,4 @@ export OP_NODE_P2P_ADVERTISE_IP=$PUBLIC_IP
4444

4545
echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH"
4646

47-
exec ./op-node
47+
exec ./op-node

0 commit comments

Comments
 (0)