corrected error codes
This commit is contained in:
@@ -29,10 +29,10 @@ class Client constructor(host: String, port: Int) {
|
|||||||
channel.writeAndFlush(request)
|
channel.writeAndFlush(request)
|
||||||
channel.closeFuture().sync()
|
channel.closeFuture().sync()
|
||||||
} catch (e: InterruptedException) {
|
} catch (e: InterruptedException) {
|
||||||
ClientHandler.requestResult.code = 2
|
ClientHandler.requestResult.code = 11
|
||||||
ClientHandler.requestResult.errorString = "command execution interrupted"
|
ClientHandler.requestResult.errorString = "command execution interrupted"
|
||||||
} catch (e: ConnectException) {
|
} catch (e: ConnectException) {
|
||||||
ClientHandler.requestResult.code = 1
|
ClientHandler.requestResult.code = 10
|
||||||
ClientHandler.requestResult.errorString = "don't can connect to server ($host:$port)"
|
ClientHandler.requestResult.errorString = "don't can connect to server ($host:$port)"
|
||||||
} finally {
|
} finally {
|
||||||
group.shutdownGracefully()
|
group.shutdownGracefully()
|
||||||
|
|||||||
Reference in New Issue
Block a user