temporary fix for poison error

This commit is contained in:
Winter 2024-11-21 04:17:57 -08:00
parent 9a1cd8bb50
commit 1227a935a2

View File

@ -44,7 +44,10 @@ impl Server {
if bytes_read > 0 {
if let Ok(request_str) = from_utf8(&buffer[..bytes_read]) {
if let Some(on_request) = &*on_request.lock().unwrap() {
// TODO: support proper error handling
if let Some(on_request) =
&*on_request.lock().unwrap_or_else(|e| e.into_inner())
{
let request;
{
let mut lines = request_str.lines();