rustdesk/rustdesk · error
Socket receive none. Maybe socks5 server is down.
Error message
Socket receive none. Maybe socks5 server is down.
What it means
start_udp's select loop treats a None from the framed stream next() as an unrecoverable condition and bails with 'Socket receive none. Maybe socks5 server is down.' The stream closed cleanly (EOF), meaning the rendezvous UDP-over-proxy channel can no longer receive messages.
Source
Thrown at src/rendezvous_mediator.rs:338
if (latency - old_latency).abs() > n || old_latency <= 0 {
Config::update_latency(&host, latency);
log::debug!("Latency of {}: {}ms", host, latency as f64 / 1000.);
old_latency = latency;
}
};
select! {
n = socket.next() => {
match n {
Some(Ok((bytes, _))) => {
if let Ok(msg) = Message::parse_from_bytes(&bytes) {
rz.handle_resp(msg.union, Sink::Framed(&mut socket, &addr), &server, &mut update_latency).await?;
} else {
log::debug!("Non-protobuf message bytes received: {:?}", bytes);
}
},
Some(Err(e)) => bail!("Failed to receive next: {}", e), // maybe socks5 tcp disconnected
None => {
bail!("Socket receive none. Maybe socks5 server is down.");
},
}
},
_ = timer.tick() => {
if SHOULD_EXIT.load(Ordering::SeqCst) {
break;
}
// The server already told us this device is not deployed. Skip
// the whole register / fails / latency / UDP-rebind path until
// DEPLOY_RETRY_INTERVAL elapses, otherwise the loop spins every
// few seconds (log spam + misapplied network-recovery rebind)
// until the operator runs `rustdesk --deploy`.
if deploy_register_throttled().await {
continue;
}
let now = Some(Instant::now());
let expired = last_register_resp.map(|x| x.elapsed().as_millis() as i64 >= REG_INTERVAL).unwrap_or(true);
let timeout = last_register_sent.map(|x| x.elapsed().as_millis() as i64 >= reg_timeout).unwrap_or(false);View on GitHub (pinned to 91c9fccbb0)
Solutions
- Check/restart the SOCKS5 proxy server
- Restart the RustDesk client so start_udp re-establishes the channel
- Investigate proxy idle-timeout settings and raise keepalive intervals
- Disable SOCKS5 proxying for the rendezvous connection if not needed
- Check system power settings (sleep/resume closes sockets)
Defensive patterns
Strategy: retry
Validate before calling
// probe proxy before starting
if !socks5_probe(proxy_addr).await { warn!("socks5 proxy unreachable"); } Try / catch
if let Err(e) = start_udp().await {
if e.to_string().contains("Maybe socks5 server is down") {
restart_socks5_or_fallback_direct();
}
} Prevention
- Run a supervised/auto-restarting SOCKS5 proxy
- Raise proxy idle timeouts to survive quiet rendezvous periods
- Handle system sleep/resume by re-establishing sockets
When it happens
Trigger: next() returns None: the socket/proxy stream is closed — commonly the SOCKS5 TCP tunnel ended, or the local socket was shut down.
Common situations: SOCKS5 proxy process exiting or dropping idle tunnels, system sleep/resume invalidating the socket, client service stopping mid-session.
Related errors
- UDP punch is timed out, {probes_sent} probes sent, {probes_s
- Found no bindable ipv4 addresses
- Failed to receive next: {}
- Stop listening on {:?} for remote {peer_addr} with KCP, {:?}
- UDP punch is timed out, stop sending packets after {:?} pack
AI-assisted analysis of rustdesk/rustdesk@91c9fccbb0 (2026-09-10).
Data as JSON: /api/errors/81b81ec0efc8b163.
Report an issue: GitHub.