mirror of https://github.com/hykilpikonna/AquaDX
[F] Fix infinite loop
parent
f33e1a0ae0
commit
99e1d130f0
|
@ -147,8 +147,8 @@ class MaimaiFutari(private val port: Int = 20101) {
|
||||||
var handler: ActiveClient? = null
|
var handler: ActiveClient? = null
|
||||||
|
|
||||||
try {
|
try {
|
||||||
while (true) {
|
while (!Thread.interrupted() && !socket.isClosed) {
|
||||||
val input = (reader.readLine() ?: if (Thread.interrupted()) break else continue).trim('\uFEFF')
|
val input = (reader.readLine() ?: break).trim('\uFEFF')
|
||||||
if (input != "1,3") log.info("${socket.remoteSocketAddress} (${handler?.clientKey}) <<< $input")
|
if (input != "1,3") log.info("${socket.remoteSocketAddress} (${handler?.clientKey}) <<< $input")
|
||||||
val message = Msg.fromString(input)
|
val message = Msg.fromString(input)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue