mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-01-04 15:50:12 +01:00
close connection when queue overflows
This commit is contained in:
parent
61988e3297
commit
57a61f0c40
|
|
@ -7,6 +7,7 @@ from owrx.bookmarks import Bookmarks
|
|||
from owrx.map import Map
|
||||
from owrx.locator import Locator
|
||||
from multiprocessing import Queue
|
||||
from queue import Full
|
||||
import json
|
||||
import threading
|
||||
|
||||
|
|
@ -39,7 +40,10 @@ class Client(object):
|
|||
self.multiprocessingPipe.close()
|
||||
|
||||
def mp_send(self, data):
|
||||
self.multiprocessingPipe.put(data, block=False)
|
||||
try:
|
||||
self.multiprocessingPipe.put(data, block=False)
|
||||
except Full:
|
||||
self.close()
|
||||
|
||||
def handleTextMessage(self, conn, message):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue