corrected error codes

This commit is contained in:
MaximZaitsev
2016-07-28 09:21:56 +03:00
parent c99919abc4
commit 6bc5874eb5
@@ -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()