1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-09 02:10:10 +08:00

Updated robot & network structure

This commit is contained in:
Him188moe 2019-09-04 22:56:18 +08:00
parent 7b8cd5d521
commit e9ee57296d

View File

@ -118,7 +118,7 @@ internal class RobotNetworkHandler(private val robot: Robot) : Closeable {
private fun restartSocket() {
socket.close()
socket = DatagramSocket((15314 + Math.random() * 100).toInt())
socket.connect(this.serverAddress).runCatching { }
socket.connect(this.serverAddress)
val zeroByte: Byte = 0
Thread {
while (true) {