riku
2021-06-17 81bd0388494d45463de42cd91bd8c33f10f0030a
src/main/kotlin/com/flightfeather/uav/socket/DeviceSession.kt
@@ -12,9 +12,10 @@
class DeviceSession {
    companion object{
        private const val DEFAULT_DEVICE = "default_device"
    }
        private val deviceMap = ConcurrentHashMap<String, ChannelHandlerContext?>()
        private val typeMap = ConcurrentHashMap<String, List<AirTypeData>>()
        private const val DEFAULT_DEVICE = "default_device"
        fun saveDevice(deviceCode: String?, channel: ChannelHandlerContext?) {
            deviceCode?.let {
@@ -42,7 +43,6 @@
                deviceCode == null -> typeMap[DEFAULT_DEVICE]
                typeMap.containsKey(deviceCode) -> typeMap[deviceCode]
                else -> null
            }
        }
    }
}