Skip to content

Commit

Permalink
app is no longer stuck when handling web socket.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Moser committed Aug 4, 2020
1 parent 2bfe70d commit 6f15aab
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions s9k.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/usr/bin/python3
import subprocess
import logging
import shlex
import argparse
import select
import os

from geventwebsocket import WebSocketError
from geventwebsocket.handler import WebSocketHandler
from gevent import pywsgi
from gevent.select import select
from gevent.subprocess import Popen, PIPE

import bottle
from bottle.ext.websocket import GeventWebSocketServer
from bottle.ext.websocket import websocket
Expand Down Expand Up @@ -312,7 +312,10 @@ def make_script_switch_to_edit():

class ApiResources:
def __init__(self):
pass
self.html_table = None
self.name_index = None
self.namespaced_index = None
self.error_message = None

def load(self):
cmd = params.command_name + " api-resources"
Expand Down Expand Up @@ -695,7 +698,7 @@ def echo(web_socket):
try:
#print("before select")
read_sock, _, error_socks = \
select.select([fd_stream, fd_out], [], [fd_stream, fd_out], 1)
select([fd_stream, fd_out], [], [fd_stream, fd_out], 1)
#print("after select read_events {} error_events {}".\
# format(len(read_sock), len(error_socks)))

Expand Down

0 comments on commit 6f15aab

Please sign in to comment.