diff options
Diffstat (limited to 'karld/src/interface/unix.rs')
-rw-r--r-- | karld/src/interface/unix.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/karld/src/interface/unix.rs b/karld/src/interface/unix.rs index 8d038d4..324b336 100644 --- a/karld/src/interface/unix.rs +++ b/karld/src/interface/unix.rs @@ -1,5 +1,7 @@ use crate::{handle_packet, CLIENT_ID_COUNTER}; -use karlcommon::{socket_path, version, ClientboundPacket, ProtoError, ServerboundPacket}; +use karlcommon::{ + interfaces::unix_path, version, ClientboundPacket, ProtoError, ServerboundPacket, +}; use log::{debug, error, info, warn}; use std::io; use std::io::{BufRead, BufReader, ErrorKind, Write}; @@ -7,11 +9,11 @@ use std::os::unix::net::{UnixListener, UnixStream}; use std::thread; pub fn run() { - if socket_path().exists() { + if unix_path().exists() { info!("remove old socket"); - std::fs::remove_file(socket_path()).unwrap(); + std::fs::remove_file(unix_path()).unwrap(); } - let listener = UnixListener::bind(socket_path()).unwrap(); + let listener = UnixListener::bind(unix_path()).unwrap(); info!("listening."); loop { |